mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Replace Closure::fromCallable() usages with first-class callables
PHP 8.1 <3
This commit is contained in:
@ -78,7 +78,7 @@ final class UnsafeForeachArrayOfStringRule implements Rule{
|
||||
return $type;
|
||||
});
|
||||
if($hasCastableKeyTypes && !$expectsIntKeyTypes){
|
||||
$func = \Closure::fromCallable([Utils::class, 'stringifyKeys']);
|
||||
$func = Utils::stringifyKeys(...);
|
||||
return [
|
||||
RuleErrorBuilder::message(sprintf(
|
||||
"Unsafe foreach on array with key type %s (they might be casted to int).",
|
||||
|
Reference in New Issue
Block a user