Skip to content

Commit

Permalink
Fixes after PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-granados committed May 25, 2024
1 parent 06331e4 commit 39259ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/Config/Level/CodeQualityLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ final class CodeQualityLevel
SimplifyFuncGetArgsCountRector::class,
SimplifyInArrayValuesRector::class,
SimplifyStrposLowerRector::class,
GetClassToInstanceOfRector::class,
SimplifyArraySearchRector::class,
SimplifyConditionsRector::class,
SimplifyIfNotNullReturnRector::class,
Expand Down Expand Up @@ -181,8 +180,12 @@ final class CodeQualityLevel
CompleteMissingIfElseBracketRector::class,
RemoveUselessIsObjectCheckRector::class,
StaticToSelfStaticMethodCallOnFinalClassRector::class,
GetClassToInstanceOfRector::class,
];

/**
* @var array<class-string, mixed[]>
*/
public const RULES_WITH_CONFIGURATION = [
RenameFunctionRector::class => [
'split' => 'explode',
Expand Down
8 changes: 5 additions & 3 deletions utils/Finder/SetRectorClassesResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ final class SetRectorClassesResolver
public static function resolve(string $setFile): array
{
// special level cases
if (realpath($setFile) === realpath(SetList::DEAD_CODE)) {
$setFileRealPath = realpath($setFile);
if ($setFileRealPath === realpath(SetList::DEAD_CODE)) {
return DeadCodeLevel::RULES;
}
if (realpath($setFile) === realpath(SetList::TYPE_DECLARATION)) {
if ($setFileRealPath === realpath(SetList::TYPE_DECLARATION)) {
return TypeDeclarationLevel::RULES;
}
if (realpath($setFile) === realpath(SetList::CODE_QUALITY)) {
if ($setFileRealPath === realpath(SetList::CODE_QUALITY)) {
return CodeQualityLevel::RULES;
}
Expand Down

0 comments on commit 39259ae

Please sign in to comment.