mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Merge branch 'minor-next' into major-next
This commit is contained in:
@ -44,6 +44,7 @@ final class DisallowForeachByReferenceRule implements Rule{
|
||||
return [
|
||||
RuleErrorBuilder::message("Foreach by-reference is not allowed, because it has surprising behaviour.")
|
||||
->tip("If the value variable is used outside of the foreach construct (e.g. in a second foreach), the iterable's contents will be unexpectedly altered.")
|
||||
->identifier('pocketmine.foreach.byRef')
|
||||
->build()
|
||||
];
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ final class UnsafeForeachArrayOfStringRule implements Rule{
|
||||
RuleErrorBuilder::message(sprintf(
|
||||
"Unsafe foreach on array with key type %s (they might be casted to int).",
|
||||
$iterableType->getIterableKeyType()->describe(VerbosityLevel::value())
|
||||
))->tip($tip)->build()
|
||||
))->tip($tip)->identifier('pocketmine.foreach.stringKeys')->build()
|
||||
];
|
||||
}
|
||||
return [];
|
||||
|
Reference in New Issue
Block a user