From 6bf9a305de7d722d15736f379cac944a5310ebee Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 3 May 2025 19:23:50 +0100 Subject: [PATCH] Rename confusing PHPStan rule name it never occurred to me that this was misleading until I read some Devin documentation, noticed that Devin misunderstood was the class was for, and then realized actually Devin understood correctly, and it was the name of the class that was wrong. Funny how that happens... --- phpstan.neon.dist | 2 +- tests/phpstan/configs/phpstan-bugs.neon | 2 +- ...fStringRule.php => UnsafeForeachArrayWithStringKeysRule.php} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename tests/phpstan/rules/{UnsafeForeachArrayOfStringRule.php => UnsafeForeachArrayWithStringKeysRule.php} (98%) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 13f35c121..391f0f54c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -15,7 +15,7 @@ rules: - pocketmine\phpstan\rules\DisallowEnumComparisonRule - pocketmine\phpstan\rules\DisallowForeachByReferenceRule - pocketmine\phpstan\rules\ExplodeLimitRule - - pocketmine\phpstan\rules\UnsafeForeachArrayOfStringRule + - pocketmine\phpstan\rules\UnsafeForeachArrayWithStringKeysRule # - pocketmine\phpstan\rules\ThreadedSupportedTypesRule parameters: diff --git a/tests/phpstan/configs/phpstan-bugs.neon b/tests/phpstan/configs/phpstan-bugs.neon index aeb3fae29..cb92bf968 100644 --- a/tests/phpstan/configs/phpstan-bugs.neon +++ b/tests/phpstan/configs/phpstan-bugs.neon @@ -256,5 +256,5 @@ parameters: message: '#^Strict comparison using \=\=\= between 0 and 0 will always evaluate to true\.$#' identifier: identical.alwaysTrue count: 1 - path: ../rules/UnsafeForeachArrayOfStringRule.php + path: ../rules/UnsafeForeachArrayWithStringKeysRule.php diff --git a/tests/phpstan/rules/UnsafeForeachArrayOfStringRule.php b/tests/phpstan/rules/UnsafeForeachArrayWithStringKeysRule.php similarity index 98% rename from tests/phpstan/rules/UnsafeForeachArrayOfStringRule.php rename to tests/phpstan/rules/UnsafeForeachArrayWithStringKeysRule.php index 34056131b..83f47f092 100644 --- a/tests/phpstan/rules/UnsafeForeachArrayOfStringRule.php +++ b/tests/phpstan/rules/UnsafeForeachArrayWithStringKeysRule.php @@ -41,7 +41,7 @@ use function sprintf; /** * @implements Rule */ -final class UnsafeForeachArrayOfStringRule implements Rule{ +final class UnsafeForeachArrayWithStringKeysRule implements Rule{ public function getNodeType() : string{ return Foreach_::class;