mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-11 22:08:42 +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[]
|
* @phpstan-return T[]
|
||||||
*/
|
*/
|
||||||
public static function cloneObjectArray(array $array) : array{
|
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