Skip to content

Commit

Permalink
Add Rector to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Plakhotnikov Vladimir committed Jun 30, 2024
1 parent f8f8474 commit 74e284a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\LogicalAnd\LogicalToBooleanRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\Config\RectorConfig;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
Expand All @@ -25,7 +26,7 @@
__DIR__ . '/phpstan-baseline.neon',
])
->withImportNames(importNames: true, importDocBlockNames: true, importShortClasses: false, removeUnusedImports: true)
->withPhpVersion(PhpVersion::PHP_82)
->withPhpVersion(PhpVersion::PHP_81)
->withPhpSets(php81: true)
->withPreparedSets(
deadCode: false,
Expand All @@ -37,7 +38,7 @@
instanceOf: true,
earlyReturn: true,
strictBooleans: true,
carbon: true,
carbon: false,
rectorPreset: true,
)->withSkip([
InlineArrayReturnAssignRector::class,
Expand All @@ -48,4 +49,5 @@
FlipTypeControlToUseExclusiveTypeRector::class,
DisallowedEmptyRuleFixerRector::class,
NullToStrictStringFuncCallArgRector::class,
EncapsedStringsToSprintfRector::class,
]);
2 changes: 1 addition & 1 deletion src/Client/Caster/TraceCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ private static function renderMethod(array $line): string

$line['type'] ??= "::";

return \sprintf('%s%s%s()', $line['class'], $line['type'], $line['function']);
return "{$line['class']}{$line['type']}{$line['function']}()";
}
}

0 comments on commit 74e284a

Please sign in to comment.