Skip to content

Commit

Permalink
Add extracted fixers from BracesFixer (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingimmick authored Aug 21, 2022
1 parent f464c31 commit 0b21c4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/set/php-cs-fixer-custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\EmptyLoopBodyFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\NoSuperfluousElseifFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Basic\NoMultipleStatementsPerLineFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Strict\StrictComparisonFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Operator\NewWithBracesFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\ImplodeCallFixer::class);
Expand Down Expand Up @@ -202,6 +203,7 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\Operator\TernaryToElvisOperatorFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\FunctionNotation\NullableTypeDeclarationForDefaultNullValueFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\SimplifiedIfReturnFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\ControlStructureBracesFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\ExplicitIndirectVariableFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\StringNotation\ExplicitStringVariableFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\StringNotation\HeredocToNowdocFixer::class);
Expand Down Expand Up @@ -299,6 +301,8 @@
$ecsConfig->rule(\PhpCsFixer\Fixer\StringNotation\NoTrailingWhitespaceInStringFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\ControlStructure\ControlStructureContinuationPositionFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\LanguageConstruct\DeclareParenthesesFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Whitespace\StatementIndentationFixer::class);
$ecsConfig->rule(\PhpCsFixer\Fixer\Basic\CurlyBracesPositionFixer::class);
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer::class, [
'remove_in_empty_for_expressions' => true,
]);
Expand Down
4 changes: 4 additions & 0 deletions src/CustomSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public function getRules(): array
'fopen_flags' => [
'b_mode' => true,
],
'statement_indentation' => true,
'no_multiple_statements_per_line' => true,
'curly_braces_position' => true,
'control_structure_braces' => true,
];
}
}

0 comments on commit 0b21c4f

Please sign in to comment.