mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Update to PHPStan 2.x
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()
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user