File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1- <?php
1+ <?php
22
33namespace Igorsgm \GitHooks \Tests \Fixtures ;
44
@@ -9,6 +9,10 @@ class ClassWithRectorIssues
99 protected function test ()
1010 {
1111 $ a = [];
12+
13+ if (empty ($ a )) {
14+ $ a = ["string " , 'another string ' ];
15+ }
1216
1317 return $ a ;
1418 }
Original file line number Diff line number Diff line change 33declare (strict_types=1 );
44
55use Rector \Config \RectorConfig ;
6- use Rector \TypeDeclaration \Rector \ClassMethod \ AddVoidReturnTypeWhereNoReturnRector ;
6+ use Rector \CodeQuality \Rector \Empty_ \ SimplifyEmptyCheckOnEmptyArrayRector ;
77
88return RectorConfig::configure ()
99 ->withPaths ([
1212 // uncomment to reach your current PHP version
1313 ->withPhpSets (php81: true )
1414 ->withRules ([
15- AddVoidReturnTypeWhereNoReturnRector ::class,
15+ SimplifyEmptyCheckOnEmptyArrayRector ::class,
1616 ]);
You can’t perform that action at this time.
0 commit comments