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
22 changes: 22 additions & 0 deletions config/set/named-args.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

use Rector\CodeQuality\Rector\Attribute\SortAttributeNamedArgsRector;
use Rector\CodeQuality\Rector\CallLike\AddNameToBooleanArgumentRector;
use Rector\CodeQuality\Rector\CallLike\AddNameToNullArgumentRector;
use Rector\CodeQuality\Rector\FuncCall\SortCallLikeNamedArgsRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector;
use Rector\NetteUtils\Rector\StaticCall\UtilsJsonStaticCallNamedArgRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rules([
AddNameToNullArgumentRector::class,
AddNameToBooleanArgumentRector::class,
RemoveNullArgOnNullDefaultParamRector::class,
SortCallLikeNamedArgsRector::class,
SortAttributeNamedArgsRector::class,
UtilsJsonStaticCallNamedArgRector::class,
]);
};
2 changes: 2 additions & 0 deletions src/Configuration/RectorConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ public function withPreparedSets(
bool $typeDeclarationDocblocks = false,
bool $privatization = false,
bool $naming = false,
bool $namedArgs = false,
bool $instanceOf = false,
bool $earlyReturn = false,
/** @deprecated */
Expand Down Expand Up @@ -801,6 +802,7 @@ public function withPreparedSets(
SetList::TYPE_DECLARATION_DOCBLOCKS => $typeDeclarationDocblocks,
SetList::PRIVATIZATION => $privatization,
SetList::NAMING => $naming,
SetList::NAMED_ARGS => $namedArgs,
SetList::INSTANCEOF => $instanceOf,
SetList::EARLY_RETURN => $earlyReturn,
SetList::CARBON => $carbon,
Expand Down
2 changes: 2 additions & 0 deletions src/Set/ValueObject/SetList.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ final class SetList

public const string NAMING = __DIR__ . '/../../../config/set/naming.php';

public const string NAMED_ARGS = __DIR__ . '/../../../config/set/named-args.php';

/**
* Opinionated rules that match rector coding standard
*/
Expand Down
Loading