mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
Utils: add some phpstan docs to fix analyse failure
fuck, I wish we had real generics :(
This commit is contained in:
parent
9492325eef
commit
9311437d42
@ -150,7 +150,9 @@ class Utils{
|
||||
* @phpstan-return T[]
|
||||
*/
|
||||
public static function cloneObjectArray(array $array) : array{
|
||||
return array_map(self::cloneCallback(), $array);
|
||||
/** @phpstan-var \Closure(T) : T $callback */
|
||||
$callback = self::cloneCallback();
|
||||
return array_map($callback, $array);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user