RegistryTrait: use native parameter types for __callStatic() arguments (#5944)

This commit is contained in:
Artem Vasyagin 2023-09-08 14:03:03 +03:00 committed by GitHub
parent 361626d236
commit fa9bba470c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,13 +98,10 @@ trait RegistryTrait{
}
/**
* @param string $name
* @param mixed[] $arguments
* @phpstan-param list<mixed> $arguments
*
* @return object
*/
public static function __callStatic($name, $arguments){
public static function __callStatic(string $name, array $arguments) : object{
if(count($arguments) > 0){
throw new \ArgumentCountError("Expected exactly 0 arguments, " . count($arguments) . " passed");
}