From 01f3b68c4e5b821a1d3893a74d4f3e22f2695961 Mon Sep 17 00:00:00 2001 From: Simon Bigelmayr Date: Mon, 12 Jan 2026 09:40:15 +0100 Subject: [PATCH] fix(phpstan): extend VariableNameIdToIDRule with additional false positives --- src/PHPStan/Rules/IdToIDRule.php | 2 ++ tests/PHPStan/IdToIDRuleTest.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/PHPStan/Rules/IdToIDRule.php b/src/PHPStan/Rules/IdToIDRule.php index 951ed34..2ac45ce 100644 --- a/src/PHPStan/Rules/IdToIDRule.php +++ b/src/PHPStan/Rules/IdToIDRule.php @@ -16,6 +16,8 @@ abstract class IdToIDRule implements Rule 'Identifier', 'Identical', 'Identity', + 'Identify', + 'Identification', 'Idt', // IDT is an abbreviation for the brand "Integrated DNA Technologies, Inc." ]; diff --git a/tests/PHPStan/IdToIDRuleTest.php b/tests/PHPStan/IdToIDRuleTest.php index c1e0886..cb15e80 100644 --- a/tests/PHPStan/IdToIDRuleTest.php +++ b/tests/PHPStan/IdToIDRuleTest.php @@ -21,6 +21,7 @@ public static function wrongID(): iterable yield ['Id']; yield ['labId']; yield ['labIds']; + yield ['TestIdEntry']; } /** @dataProvider correctID */ @@ -42,6 +43,8 @@ public static function correctID(): iterable yield ['openIdtPanelAnalyses']; yield ['isIdenticalThing']; yield ['hasIdentity']; + yield ['andIdentify']; + yield ['withIdentification']; } /** @dataProvider wrongToRight */