From 6046c24443d9bfdfe5bf8638fb82e03703ee1df8 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 31 Jan 2024 03:46:18 +0700 Subject: [PATCH] [CodingStyle] Return null on no change on StrictArraySearchRector (#5528) --- rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php b/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php index 571675527c9..9c20d1123a9 100644 --- a/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php +++ b/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php @@ -42,8 +42,9 @@ public function refactor(Node $node): ?Node if (count($node->args) === 2) { $node->args[2] = $this->nodeFactory->createArg($this->nodeFactory->createTrue()); + return $node; } - return $node; + return null; } }