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
2
2
3
3
namespace Igorsgm \GitHooks \Tests \Fixtures ;
4
4
@@ -9,6 +9,10 @@ class ClassWithRectorIssues
9
9
protected function test ()
10
10
{
11
11
$ a = [];
12
+
13
+ if (empty ($ a )) {
14
+ $ a = ["string " , 'another string ' ];
15
+ }
12
16
13
17
return $ a ;
14
18
}
Original file line number Diff line number Diff line change 3
3
declare (strict_types=1 );
4
4
5
5
use Rector \Config \RectorConfig ;
6
- use Rector \TypeDeclaration \Rector \ClassMethod \ AddVoidReturnTypeWhereNoReturnRector ;
6
+ use Rector \CodeQuality \Rector \Empty_ \ SimplifyEmptyCheckOnEmptyArrayRector ;
7
7
8
8
return RectorConfig::configure ()
9
9
->withPaths ([
12
12
// uncomment to reach your current PHP version
13
13
->withPhpSets (php81: true )
14
14
->withRules ([
15
- AddVoidReturnTypeWhereNoReturnRector ::class,
15
+ SimplifyEmptyCheckOnEmptyArrayRector ::class,
16
16
]);
You can’t perform that action at this time.
0 commit comments