The expression self::$instances[$key]; of type Paillechat\Enum\StaticEn...llechat\Enum\StaticEnum adds the type Paillechat\Enum\StaticEnum[] to the return on line 22 which is incompatible with the return type of the parent method Paillechat\Enum\Enum::createNamedInstance of type Paillechat\Enum\Enum.
Loading history...
23
}
24
25
4
private static function getConstantReflection(string $class, string $name): \ReflectionClassConstant
26
{
27
4
$key = self::getConstKey($class, $name);
28
4
if (!array_key_exists($key, self::$constReflections)) {