Skip to content

Commit

Permalink
Enable all rector rules
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMuller committed Jan 5, 2025
1 parent eb62991 commit 6674565
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions rector.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php declare(strict_types=1);

use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\PropertyProperty\RemoveNullPropertyInitializationRector;
use Rector\DeadCode\Rector\Stmt\RemoveUnreachableStatementRector;
Expand All @@ -22,30 +23,24 @@
])
->withSkip([
ClosureToArrowFunctionRector::class,
EncapsedStringsToSprintfRector::class,
RemoveNullPropertyInitializationRector::class,
])
->withPaths([
__DIR__ . '/src',
])
->withParallel(300, 15, 15)
// here we can define, what prepared sets of rules will be applied
->withPreparedSets(
codeQuality: false,
codingStyle: false,
privatization: false,
naming: false,
earlyReturn: false,
)
->withPreparedSets(
deadCode: true,
codeQuality: false,
codingStyle: false,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
naming: false,
naming: true,
instanceOf: true,
earlyReturn: true,
strictBooleans: false,
strictBooleans: true,
carbon: true,
rectorPreset: true,
phpunitCodeQuality: true,
Expand Down
2 changes: 1 addition & 1 deletion src/StopwatchCheckpointCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function addCheckpoint(string $label, ?array $metadata, CarbonImmutable $
public function render(Stopwatch $stopWatch, int $slowThreshold): string
{
return $this->implode(
static fn (StopwatchCheckpoint $checkpoint): string => $checkpoint->render($stopWatch, $slowThreshold),
static fn (StopwatchCheckpoint $stopwatchCheckpoint): string => $stopwatchCheckpoint->render($stopWatch, $slowThreshold),
);
}
}

0 comments on commit 6674565

Please sign in to comment.