From 99021d5cb8c908089348b480534593e5defa316b Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Mon, 14 Oct 2024 09:36:22 +0100 Subject: [PATCH] feat(ecs): JIRA-13743 Add `function_declaration` --- README.md | 7 ++++++- src/WorksomeEcsConfig.php | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1bef8fc..d353991 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ The Worksome code style extends the [PSR-12 base rule set](https://php-fig.org/p ### Excluded / Skipped Rules -- [`FunctionDeclarationFixer`](https://cs.symfony.com/doc/rules/function_notation/function_declaration.html) - [`UnaryOperatorSpacesFixer`](https://cs.symfony.com/doc/rules/operator/unary_operator_spaces.html) ### Additional / Customised Rules @@ -64,6 +63,8 @@ The Worksome code style extends the [PSR-12 base rule set](https://php-fig.org/p - [`ArraySyntaxFixer`](https://cs.symfony.com/doc/rules/array_notation/array_syntax.html) - [`BinaryOperatorSpacesFixer` ⚙️](https://cs.symfony.com/doc/rules/operator/binary_operator_spaces.html) +- [`BlankLineBeforeStatementFixer` ⚙️](https://cs.symfony.com/doc/rules/whitespace/blank_line_before_statement.html) +- [`ClassAttributesSeparationFixer`](https://cs.symfony.com/doc/rules/class_notation/class_attributes_separation.html) - [`ClassDefinitionFixer`](https://cs.symfony.com/doc/rules/class_notation/class_definition.html) - [`LineEndingFixer`](https://cs.symfony.com/doc/rules/whitespace/line_ending.html) - [`ListSyntaxFixer`](https://cs.symfony.com/doc/rules/list_notation/list_syntax.html) @@ -72,12 +73,16 @@ The Worksome code style extends the [PSR-12 base rule set](https://php-fig.org/p - [`OperatorLinebreakFixer` ⚙️](https://cs.symfony.com/doc/rules/operator/operator_linebreak.html) - [`OrderedImportsFixer` ⚙️](https://cs.symfony.com/doc/rules/import/ordered_imports.html) - [`PhpdocAlignFixer` ⚙️](https://cs.symfony.com/doc/rules/phpdoc/phpdoc_align.html) +- [`PhpdocNoUselessInheritdocFixer`](https://cs.symfony.com/doc/rules/phpdoc/phpdoc_no_useless_inheritdoc.html) - [`PhpdocSeparationFixer`](https://cs.symfony.com/doc/rules/phpdoc/phpdoc_separation.html) +- [`PhpdocTrimFixer`](https://cs.symfony.com/doc/rules/phpdoc/phpdoc_trim.html) +- [`SingleQuoteFixer`](https://cs.symfony.com/doc/rules/string_notation/single_quote.html) - [`SingleTraitInsertPerStatementFixer`](https://cs.symfony.com/doc/rules/class_notation/single_trait_insert_per_statement.html) - [`ShortScalarCastFixer`](https://cs.symfony.com/doc/rules/cast_notation/short_scalar_cast.html) - [`NoEmptyStatementFixer`](https://cs.symfony.com/doc/rules/semicolon/no_empty_statement.html) - [`NoUnneededImportAliasFixer`](https://cs.symfony.com/doc/rules/import/no_unneeded_import_alias.html) - [`NoUnusedImportsFixer`](https://cs.symfony.com/doc/rules/import/no_unused_imports.html) +- [`TrailingCommaInMultilineFixer`](https://cs.symfony.com/doc/rules/control_structure/trailing_comma_in_multiline.html) - [`TypesSpacesFixer`](https://cs.symfony.com/doc/rules/whitespace/types_spaces.html) #### [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) diff --git a/src/WorksomeEcsConfig.php b/src/WorksomeEcsConfig.php index 9039f24..2413fe1 100644 --- a/src/WorksomeEcsConfig.php +++ b/src/WorksomeEcsConfig.php @@ -22,7 +22,6 @@ use PhpCsFixer\Fixer\ClassNotation\SingleTraitInsertPerStatementFixer; use PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer; use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer; -use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer; use PhpCsFixer\Fixer\Import\NoUnneededImportAliasFixer; use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer; use PhpCsFixer\Fixer\Import\OrderedImportsFixer; @@ -218,7 +217,6 @@ public static function setup(ECSConfig $ecsConfig): void public static function skips(array $additional = []): array { return [ - FunctionDeclarationFixer::class, UnaryOperatorSpacesFixer::class, ...$additional, ];