Improve PHPStan error reporting for unsafe foreaches

these are actually two separate concerns: one for dodgy PHPStan type suppression on implicit keys, and the other for arrays being casted to strings by PHP.
This commit is contained in:
Dylan K. Taylor
2025-05-08 02:21:39 +01:00
parent f2e7473629
commit d789c75c00
2 changed files with 26 additions and 19 deletions

View File

@ -15,7 +15,7 @@ rules:
- pocketmine\phpstan\rules\DisallowEnumComparisonRule
- pocketmine\phpstan\rules\DisallowForeachByReferenceRule
- pocketmine\phpstan\rules\ExplodeLimitRule
- pocketmine\phpstan\rules\UnsafeForeachArrayOfStringRule
- pocketmine\phpstan\rules\UnsafeForeachRule
# - pocketmine\phpstan\rules\ThreadedSupportedTypesRule
parameters: