Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Feb 14, 2024
1 parent 1f353a5 commit a489937
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 34 deletions.
34 changes: 6 additions & 28 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,13 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
SetList::CODING_STYLE,
SetList::TYPE_DECLARATION,
SetList::NAMING,
SetList::PRIVATIZATION,
SetList::EARLY_RETURN,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::PHPUNIT_100,
]);

$rectorConfig->paths([
__DIR__ . '/config',
__DIR__ . '/src',
__DIR__ . '/tests',
]);

$rectorConfig->importNames();

$rectorConfig->skip([
'*/scoper.php',
return RectorConfig::configure()
->withPaths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests'])
->withPhpSets()
->withPreparedSets(codeQuality: true, codingStyle: true, naming: true, earlyReturn: true, privatization: true)
->withImportNames(removeUnusedImports: true)
->withSkip([
'*/Source/*',
'*/Fixture/*',
]);
};
3 changes: 1 addition & 2 deletions src/Fixer/Commenting/RemoveUselessDefaultCommentFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Symplify\CodingStandard\Fixer\Commenting;

use PhpCsFixer\Fixer\Basic\BracesFixer;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Token;
Expand Down Expand Up @@ -48,7 +47,7 @@ public function isCandidate(Tokens $tokens): bool

public function getPriority(): int
{
/** must run before @see BracesFixer to cleanup spaces */
/** must run before @see \PhpCsFixer\Fixer\Basic\BracesFixer to cleanup spaces */
return 40;
}

Expand Down
3 changes: 1 addition & 2 deletions src/Fixer/Spacing/StandaloneLineConstructorParamFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Symplify\CodingStandard\Fixer\Spacing;

use PhpCsFixer\Fixer\Basic\BracesFixer;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Token;
Expand Down Expand Up @@ -36,7 +35,7 @@ public function __construct(
/**
* Must run before
*
* @see BracesFixer::getPriority()
* @see \PhpCsFixer\Fixer\Basic\BracesFixer::getPriority()
*/
public function getPriority(): int
{
Expand Down
3 changes: 1 addition & 2 deletions src/Fixer/Spacing/StandaloneLinePromotedPropertyFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Symplify\CodingStandard\Fixer\Spacing;

use PhpCsFixer\Fixer\Basic\BracesFixer;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\CT;
Expand Down Expand Up @@ -37,7 +36,7 @@ public function __construct(
/**
* Must run before
*
* @see BracesFixer::getPriority()
* @see \PhpCsFixer\Fixer\Basic\BracesFixer::getPriority()
*/
public function getPriority(): int
{
Expand Down

0 comments on commit a489937

Please sign in to comment.