Skip to content

Commit 8b4984f

Browse files
authored
Merge pull request #230 from kenjis/fix-rector-error
chore: workaroud for rector to break code
2 parents 45f7522 + 4fe9936 commit 8b4984f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rector.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
use Rector\Config\RectorConfig;
43
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
54
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
65
use Rector\CodeQuality\Rector\For_\ForToForeachRector;
@@ -18,9 +17,11 @@
1817
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
1918
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
2019
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
20+
use Rector\Config\RectorConfig;
2121
use Rector\Core\ValueObject\PhpVersion;
2222
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
2323
use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector;
24+
use Rector\DeadCode\Rector\StmtsAwareInterface\RemoveJustPropertyFetchForAssignRector;
2425
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
2526
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
2627
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
@@ -90,6 +91,11 @@
9091

9192
// May be uninitialized on purpose
9293
AddDefaultValueForUndefinedVariableRector::class,
94+
95+
// See https://github.com/codeigniter4/shield/issues/228
96+
RemoveJustPropertyFetchForAssignRector::class => [
97+
__DIR__ . '/src/Models/UserModel.php',
98+
],
9399
]);
94100
$rectorConfig->rule(SimplifyUselessVariableRector::class);
95101
$rectorConfig->rule(RemoveAlwaysElseRector::class);

0 commit comments

Comments
 (0)