Skip to content

Commit

Permalink
fix: rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevsr committed Apr 2, 2024
1 parent f06a64e commit 1da5e43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

declare(strict_types=1);

use PHPDevsr\Rector\Codeigniter4\Set\CodeigniterSetList;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;

return RectorConfig::configure()
->withImportNames(removeUnusedImports:true)
->withSets([
CodeigniterSetList::CODEIGNITER_44,
])
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
Expand All @@ -20,6 +24,4 @@
// skip for handle scoped, like in the rector-src as well
// @see https://github.com/rectorphp/rector-src/blob/7f73cf017214257c170d34db3af7283eaeeab657/rector.php#L71
StringClassNameToClassConstantRector::class,
])
->withPhpSets()
->withPreparedSets(deadCode: true, codeQuality: true, naming: true);
]);
2 changes: 1 addition & 1 deletion src/Utils/UnderscoreToCamelCaseVariableNameRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private function processRenameVariable(Node $node): ?Variable

private function updateDocblock(string $variableName, string $camelCaseName, ?FunctionLike $functionLike): void
{
if (!$functionLike instanceof FunctionLike) {
if ($functionLike === null) {
return;
}

Expand Down

0 comments on commit 1da5e43

Please sign in to comment.