Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/set/rector-preset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

use Rector\Utils\Rector\RemoveRefactorDuplicatedNodeInstanceCheckRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\Config\RectorConfig;
use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector;
Expand All @@ -12,5 +14,7 @@
DeclareStrictTypesRector::class,
PostIncDecToPreIncDecRector::class,
FinalizeTestCaseClassRector::class,
RemoveRefactorDuplicatedNodeInstanceCheckRector::class,
AddSeeTestAnnotationRector::class,
]);
};
5 changes: 1 addition & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector;
use Rector\DeadCode\Rector\ConstFetch\RemovePhpVersionIdCheckRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\Utils\Rector\RemoveRefactorDuplicatedNodeInstanceCheckRector;

return RectorConfig::configure()
->withPreparedSets(
Expand Down Expand Up @@ -39,8 +37,7 @@
__DIR__ . '/build/build-preload.php',
])
->withRootFiles()
->withImportNames(removeUnusedImports: true)
->withRules([RemoveRefactorDuplicatedNodeInstanceCheckRector::class, AddSeeTestAnnotationRector::class])
->withImportNames()
->withSkip([
StringClassNameToClassConstantRector::class,
// tests
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/RectorConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ public function withImportNames(
bool $importNames = true,
bool $importDocBlockNames = true,
bool $importShortClasses = true,
bool $removeUnusedImports = false
bool $removeUnusedImports = true
): self {
$this->importNames = $importNames;
$this->importDocBlockNames = $importDocBlockNames;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ namespace Symfony\Component\Serializer\Annotation

}

?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ declare(strict_types=1);
namespace Rector\Tests\Issues\ImportFullyQualifiedIdentifierDocblock;

use DateTime;
use stdClass;

final class AddPropertyVar2
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ class InUseFqcnDocblock
}
}

?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ final readonly class Fixture
) {}
}

?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ class Fixture
}
}

?>
?>
Loading