diff --git a/src/Entity.php b/src/Entity.php index b5634d4..3529b9a 100644 --- a/src/Entity.php +++ b/src/Entity.php @@ -37,14 +37,14 @@ public static function getMapValueByKey(string $key) { throw new InvalidArgumentException("Ключ {$key} отсутствует."); } - return self::$map[$key]; + return static::$map[$key]; } /** * @inheritDoc */ public static function has(string $key): bool { - return array_key_exists($key, self::$map); + return array_key_exists($key, static::$map); } /** @@ -52,13 +52,13 @@ public static function has(string $key): bool { */ public static function getMap(string $key = ''): array { if (empty($key)) { - return self::$map; + return static::$map; } if (!self::has($key)) { throw new InvalidArgumentException("Ключ {$key} отсутствует."); } - return [$key => self::$map[$key]]; + return [$key => static::$map[$key]]; } -} \ No newline at end of file +}