From bc1f1211df4d03fe780ae00d6043cf2f882767f7 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Mon, 21 Sep 2026 09:57:41 +0200 Subject: [PATCH] Fix build --- tests/Levels/data/arithmeticOperators-4.json | 37 +++++++++++++++++++ tests/Levels/data/foreach-4.json | 7 ++++ ...rwriteVariablesWithForLoopInitRuleTest.php | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 tests/Levels/data/arithmeticOperators-4.json create mode 100644 tests/Levels/data/foreach-4.json diff --git a/tests/Levels/data/arithmeticOperators-4.json b/tests/Levels/data/arithmeticOperators-4.json new file mode 100644 index 0000000..c6a6dbb --- /dev/null +++ b/tests/Levels/data/arithmeticOperators-4.json @@ -0,0 +1,37 @@ +[ + { + "ignorable": true, + "line": 25, + "message": "Variable $r is never read." + }, + { + "ignorable": true, + "line": 26, + "message": "Variable $r is never read." + }, + { + "ignorable": true, + "line": 27, + "message": "Variable $r is never read." + }, + { + "ignorable": true, + "line": 28, + "message": "Variable $r is never read." + }, + { + "ignorable": true, + "line": 29, + "message": "Variable $r is never read." + }, + { + "ignorable": true, + "line": 36, + "message": "Variable $r is never read." + }, + { + "ignorable": true, + "line": 43, + "message": "Variable $r is never read." + } +] diff --git a/tests/Levels/data/foreach-4.json b/tests/Levels/data/foreach-4.json new file mode 100644 index 0000000..0fc37e7 --- /dev/null +++ b/tests/Levels/data/foreach-4.json @@ -0,0 +1,7 @@ +[ + { + "ignorable": true, + "line": 4, + "message": "Foreach value variable $val is never read." + } +] diff --git a/tests/Rules/ForLoop/OverwriteVariablesWithForLoopInitRuleTest.php b/tests/Rules/ForLoop/OverwriteVariablesWithForLoopInitRuleTest.php index fa999d2..9ba7a37 100644 --- a/tests/Rules/ForLoop/OverwriteVariablesWithForLoopInitRuleTest.php +++ b/tests/Rules/ForLoop/OverwriteVariablesWithForLoopInitRuleTest.php @@ -4,6 +4,7 @@ use PHPStan\Rules\Rule; use PHPStan\Testing\RuleTestCase; +use function array_merge; /** * @template-extends RuleTestCase @@ -94,5 +95,4 @@ public function testLoopVariableReuse(): void ]); } - }