Skip to content

Commit 5c27ce1

Browse files
Исправлена область видимости переменной
1 parent 2609102 commit 5c27ce1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Entity.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,28 @@ public static function getMapValueByKey(string $key) {
3737
throw new InvalidArgumentException("Ключ {$key} отсутствует.");
3838
}
3939

40-
return self::$map[$key];
40+
return static::$map[$key];
4141
}
4242

4343
/**
4444
* @inheritDoc
4545
*/
4646
public static function has(string $key): bool {
47-
return array_key_exists($key, self::$map);
47+
return array_key_exists($key, static::$map);
4848
}
4949

5050
/**
5151
* @inheritDoc
5252
*/
5353
public static function getMap(string $key = ''): array {
5454
if (empty($key)) {
55-
return self::$map;
55+
return static::$map;
5656
}
5757

5858
if (!self::has($key)) {
5959
throw new InvalidArgumentException("Ключ {$key} отсутствует.");
6060
}
6161

62-
return [$key => self::$map[$key]];
62+
return [$key => static::$map[$key]];
6363
}
64-
}
64+
}

0 commit comments

Comments
 (0)