diff --git a/src/Editor.php b/src/Editor.php index e517814..5a63675 100644 --- a/src/Editor.php +++ b/src/Editor.php @@ -3,6 +3,7 @@ namespace Kilo; use FFI; +use ReflectionClass; trait MagicProperties { abstract public function __get(string $name); @@ -37,15 +38,7 @@ class Key { public static function getConstList(): array { - static $self; - - if ($self === NULL) - { - $class = static::class; - $self = new $class; - } - - return (new \ReflectionClass($self))->getConstants(); + return (new ReflectionClass(static::class))->getConstants(); } }