From edce25ba78838beb6d5f870c521e34e4ea5395e7 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 30 May 2024 14:44:07 +0700 Subject: [PATCH 1/2] Enable rectorPreset set --- rector.php | 3 ++- rules/Orm28/Rector/MethodCall/IterateToToIterableRector.php | 2 +- .../DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rector.php b/rector.php index 444c0480..f24a8eee 100644 --- a/rector.php +++ b/rector.php @@ -17,7 +17,8 @@ codingStyle: true, naming: true, typeDeclarations: true, - privatization: true + privatization: true, + rectorPreset: true ) ->withConfiguredRule(StringClassNameToClassConstantRector::class, [ 'Doctrine\*', diff --git a/rules/Orm28/Rector/MethodCall/IterateToToIterableRector.php b/rules/Orm28/Rector/MethodCall/IterateToToIterableRector.php index edb6ea6e..9f21c9b6 100644 --- a/rules/Orm28/Rector/MethodCall/IterateToToIterableRector.php +++ b/rules/Orm28/Rector/MethodCall/IterateToToIterableRector.php @@ -76,7 +76,7 @@ public function run(): iterable } /** - * @param ClassMethod|MethodCall|Node\Stmt\Foreach_ $node + * @param ClassMethod|MethodCall|Foreach_ $node */ public function refactor(Node $node): MethodCall|ClassMethod|Foreach_|null { diff --git a/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php b/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php index ee2a750b..ad81c77d 100644 --- a/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php +++ b/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php @@ -1,12 +1,16 @@ Date: Thu, 30 May 2024 14:44:32 +0700 Subject: [PATCH 2/2] Enable rectorPreset set --- .../Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php b/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php index ad81c77d..10c049cf 100644 --- a/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php +++ b/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php @@ -2,8 +2,6 @@ declare(strict_types=1); -declare(strict_types=1); - namespace Rector\Doctrine\Tests\Set\DoctrineCOLLECTION22Set; use Iterator;