Skip to content

Commit

Permalink
Re-generate ruleset for friendsofphp/php-cs-fixer 3.64
Browse files Browse the repository at this point in the history
  • Loading branch information
zingimmick committed Oct 8, 2024
1 parent 2acc604 commit a334e54
Show file tree
Hide file tree
Showing 11 changed files with 282 additions and 33 deletions.
19 changes: 11 additions & 8 deletions config/set/php-cs-fixer-custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\NoSuperfluousElseifFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Strict\StrictComparisonFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Operator\NewWithParenthesesFixer::class, [
'anonymous_class' => false,
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\ImplodeCallFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\SingleSpaceAroundConstructFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class, [
'single_line' => true,
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\ClassNotation\SingleTraitInsertPerStatementFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\SingleSpaceAroundConstructFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\CombineNestedDirnameFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Alias\PowToExponentiationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer::class);
Expand Down Expand Up @@ -96,11 +96,16 @@
],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Phpdoc\PhpdocAddMissingParamAnnotationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\NamespaceNotation\CleanNamespaceFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Phpdoc\PhpdocNoAccessFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Phpdoc\PhpdocReturnSelfReferenceFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderNameFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderStaticFixer::class, [
'force' => true,
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Import\FullyQualifiedStrictTypesFixer::class, [
'leading_backslash_in_global_namespace' => true,
'phpdoc_tags' => [],
Expand All @@ -119,7 +124,6 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\NoSpacesAfterFunctionNameFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\SpacesInsideParenthesesFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\NamespaceNotation\CleanNamespaceFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\NullableTypeDeclarationForDefaultNullValueFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer::class);
Expand Down Expand Up @@ -163,13 +167,16 @@
'sort_algorithm' => 'none',
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Phpdoc\PhpdocVarAnnotationCorrectOrderFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class, [
'after_heredoc' => true,
'elements' => ['array_destructuring', 'arrays'],
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer::class, [
'ensure_single_space' => true,
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Operator\ConcatSpaceFixer::class, [
'spacing' => 'one',
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\CompactNullableTypeDeclarationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer::class);
Expand Down Expand Up @@ -228,10 +235,6 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\SwitchContinueToBreakFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\TypeDeclarationSpacesFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderNameFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderStaticFixer::class, [
'force' => true,
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\PhpUnit\PhpUnitTestCaseStaticMethodCallsFixer::class, [
'call_type' => 'this',
Expand Down
47 changes: 46 additions & 1 deletion config/set/php-cs-fixer/per-cs.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,51 @@
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\IndentationTypeFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\ElseifFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Operator\NewWithParenthesesFixer::class, [
'anonymous_class' => false,
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\LanguageConstruct\SingleSpaceAroundConstructFixer::class, [
'constructs_followed_by_a_single_space' => [
'abstract',
'as',
'case',
'catch',
'class',
'const',
'const_import',
'do',
'else',
'elseif',
'enum',
'final',
'finally',
'for',
'foreach',
'function',
'function_import',
'if',
'insteadof',
'interface',
'match',
'named_argument',
'namespace',
'new',
'private',
'protected',
'public',
'readonly',
'static',
'switch',
'trait',
'try',
'type_colon',
'use',
'use_lambda',
'while',
],
'constructs_preceded_by_a_single_space' => ['as', 'else', 'elseif', 'use_lambda'],
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class, [
'inline_constructor_arguments' => false,
'space_before_parenthesis' => true,
Expand All @@ -43,7 +85,7 @@
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class, [
'after_heredoc' => true,
'elements' => ['arguments', 'arrays', 'match', 'parameters'],
'elements' => ['arguments', 'array_destructuring', 'arrays', 'match', 'parameters'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\CompactNullableTypeDeclarationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer::class);
Expand Down Expand Up @@ -73,6 +115,9 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Basic\SingleLineEmptyBodyFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer::class, [
'tokens' => ['use'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Import\OrderedImportsFixer::class, [
Expand Down
38 changes: 38 additions & 0 deletions config/set/php-cs-fixer/per-cs10.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,41 @@
'inline_constructor_arguments' => false,
'space_before_parenthesis' => true,
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\LanguageConstruct\SingleSpaceAroundConstructFixer::class, [
'constructs_followed_by_a_single_space' => [
'abstract',
'as',
'case',
'catch',
'class',
'const_import',
'do',
'else',
'elseif',
'final',
'finally',
'for',
'foreach',
'function',
'function_import',
'if',
'insteadof',
'interface',
'namespace',
'new',
'private',
'protected',
'public',
'static',
'switch',
'trait',
'try',
'use',
'use_lambda',
'while',
],
'constructs_preceded_by_a_single_space' => ['as', 'else', 'elseif', 'use_lambda'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\ClassNotation\SingleTraitInsertPerStatementFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer::class, [
Expand Down Expand Up @@ -62,6 +97,9 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\StatementIndentationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer::class, [
'tokens' => ['use'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Import\OrderedImportsFixer::class, [
Expand Down
47 changes: 46 additions & 1 deletion config/set/php-cs-fixer/per-cs20.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,52 @@
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Operator\NewWithParenthesesFixer::class, [
'anonymous_class' => false,
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class, [
'inline_constructor_arguments' => false,
'space_before_parenthesis' => true,
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\LanguageConstruct\SingleSpaceAroundConstructFixer::class, [
'constructs_followed_by_a_single_space' => [
'abstract',
'as',
'case',
'catch',
'class',
'const',
'const_import',
'do',
'else',
'elseif',
'enum',
'final',
'finally',
'for',
'foreach',
'function',
'function_import',
'if',
'insteadof',
'interface',
'match',
'named_argument',
'namespace',
'new',
'private',
'protected',
'public',
'readonly',
'static',
'switch',
'trait',
'try',
'type_colon',
'use',
'use_lambda',
'while',
],
'constructs_preceded_by_a_single_space' => ['as', 'else', 'elseif', 'use_lambda'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\ClassNotation\SingleTraitInsertPerStatementFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer::class, [
'closure_fn_spacing' => 'none',
Expand Down Expand Up @@ -62,7 +104,7 @@
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class, [
'after_heredoc' => true,
'elements' => ['arguments', 'arrays', 'match', 'parameters'],
'elements' => ['arguments', 'array_destructuring', 'arrays', 'match', 'parameters'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Basic\NoMultipleStatementsPerLineFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Basic\BracesPositionFixer::class, [
Expand All @@ -73,6 +115,9 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Basic\SingleLineEmptyBodyFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer::class, [
'tokens' => ['use'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Import\OrderedImportsFixer::class, [
Expand Down
47 changes: 46 additions & 1 deletion config/set/php-cs-fixer/per.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,51 @@
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\IndentationTypeFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\ElseifFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Operator\NewWithParenthesesFixer::class, [
'anonymous_class' => false,
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\LanguageConstruct\SingleSpaceAroundConstructFixer::class, [
'constructs_followed_by_a_single_space' => [
'abstract',
'as',
'case',
'catch',
'class',
'const',
'const_import',
'do',
'else',
'elseif',
'enum',
'final',
'finally',
'for',
'foreach',
'function',
'function_import',
'if',
'insteadof',
'interface',
'match',
'named_argument',
'namespace',
'new',
'private',
'protected',
'public',
'readonly',
'static',
'switch',
'trait',
'try',
'type_colon',
'use',
'use_lambda',
'while',
],
'constructs_preceded_by_a_single_space' => ['as', 'else', 'elseif', 'use_lambda'],
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class, [
'inline_constructor_arguments' => false,
'space_before_parenthesis' => true,
Expand All @@ -43,7 +85,7 @@
]);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class, [
'after_heredoc' => true,
'elements' => ['arguments', 'arrays', 'match', 'parameters'],
'elements' => ['arguments', 'array_destructuring', 'arrays', 'match', 'parameters'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\CompactNullableTypeDeclarationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer::class);
Expand Down Expand Up @@ -73,6 +115,9 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Basic\SingleLineEmptyBodyFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer::class, [
'tokens' => ['use'],
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Import\OrderedImportsFixer::class, [
Expand Down
10 changes: 5 additions & 5 deletions config/set/php-cs-fixer/php-cs-fixer-risky.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\NoUnsetOnPropertyFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Operator\LongToShorthandOperatorFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderNameFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderReturnTypeFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderStaticFixer::class, [
'force' => true,
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Operator\TernaryToElvisOperatorFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderReturnTypeFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ConstantNotation\NativeConstantInvocationFixer::class, [
'fix_built_in' => false,
Expand Down Expand Up @@ -56,10 +60,6 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitSetUpTearDownVisibilityFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Alias\SetTypeToCastFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\StringNotation\StringLineEndingFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderNameFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderStaticFixer::class, [
'force' => true,
]);
$ecsConfig->rule(\PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\PhpUnit\PhpUnitTestCaseStaticMethodCallsFixer::class, [
'call_type' => 'self',
Expand Down
Loading

0 comments on commit a334e54

Please sign in to comment.