mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Fix PHPStan
This commit is contained in:
parent
b1e4e44f77
commit
9e7e76a609
@ -49,6 +49,9 @@ if(count($argv) !== 2){
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-param \ReflectionClass<*> $class
|
||||
*/
|
||||
function makeTypehint(string $namespaceName, \ReflectionClass $class) : string{
|
||||
return $class->getNamespaceName() === $namespaceName ? $class->getShortName() : '\\' . $class->getName();
|
||||
}
|
||||
|
@ -166,6 +166,7 @@ trait RegistryTrait{
|
||||
throw new \Error("Wrong enum type for overloaded registry member " . self::class . "::" . mb_strtoupper($name) . "($overloadInfo->enumClass)");
|
||||
}
|
||||
$memberName = $overloadInfo->enumToMemberMap[$enum->name];
|
||||
assert(self::$members !== null);
|
||||
return self::preprocessMember(self::$members[$memberName]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user