diff --git a/config/set/named-args.php b/config/set/named-args.php new file mode 100644 index 00000000000..3cbdc6bdea8 --- /dev/null +++ b/config/set/named-args.php @@ -0,0 +1,22 @@ +rules([ + AddNameToNullArgumentRector::class, + AddNameToBooleanArgumentRector::class, + RemoveNullArgOnNullDefaultParamRector::class, + SortCallLikeNamedArgsRector::class, + SortAttributeNamedArgsRector::class, + UtilsJsonStaticCallNamedArgRector::class, + ]); +}; diff --git a/src/Configuration/RectorConfigBuilder.php b/src/Configuration/RectorConfigBuilder.php index 647fcf2262b..73e6793691d 100644 --- a/src/Configuration/RectorConfigBuilder.php +++ b/src/Configuration/RectorConfigBuilder.php @@ -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 */ @@ -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, diff --git a/src/Set/ValueObject/SetList.php b/src/Set/ValueObject/SetList.php index 5acfe0ade65..e86985a3106 100644 --- a/src/Set/ValueObject/SetList.php +++ b/src/Set/ValueObject/SetList.php @@ -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 */