Skip to content

Commit 1da5e43

Browse files
committed
fix: rules
1 parent f06a64e commit 1da5e43

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

rector.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
declare(strict_types=1);
44

5+
use PHPDevsr\Rector\Codeigniter4\Set\CodeigniterSetList;
56
use Rector\Config\RectorConfig;
67
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
78

89
return RectorConfig::configure()
910
->withImportNames(removeUnusedImports:true)
11+
->withSets([
12+
CodeigniterSetList::CODEIGNITER_44,
13+
])
1014
->withPaths([
1115
__DIR__ . '/src',
1216
__DIR__ . '/tests',
@@ -20,6 +24,4 @@
2024
// skip for handle scoped, like in the rector-src as well
2125
// @see https://github.com/rectorphp/rector-src/blob/7f73cf017214257c170d34db3af7283eaeeab657/rector.php#L71
2226
StringClassNameToClassConstantRector::class,
23-
])
24-
->withPhpSets()
25-
->withPreparedSets(deadCode: true, codeQuality: true, naming: true);
27+
]);

src/Utils/UnderscoreToCamelCaseVariableNameRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private function processRenameVariable(Node $node): ?Variable
168168

169169
private function updateDocblock(string $variableName, string $camelCaseName, ?FunctionLike $functionLike): void
170170
{
171-
if (!$functionLike instanceof FunctionLike) {
171+
if ($functionLike === null) {
172172
return;
173173
}
174174

0 commit comments

Comments
 (0)