diff --git a/packages/php-linting-rules/configs/ecs.php b/packages/php-linting-rules/configs/ecs.php index 357f108..d7eb94b 100644 --- a/packages/php-linting-rules/configs/ecs.php +++ b/packages/php-linting-rules/configs/ecs.php @@ -42,7 +42,7 @@ ->withConfiguredRule(SlevomatCodingStandard\Sniffs\Classes\EnumCaseSpacingSniff::class, ['minLinesCountBeforeWithComment' => 1, 'maxLinesCountBeforeWithComment' => 1, 'minLinesCountBeforeWithoutComment' => 0, 'maxLinesCountBeforeWithoutComment' => 0]) ->withConfiguredRule(SlevomatCodingStandard\Sniffs\Classes\MethodSpacingSniff::class, ['minLinesCount' => 1, 'maxLinesCount' => 1]) ->withConfiguredRule(SlevomatCodingStandard\Sniffs\Classes\ParentCallSpacingSniff::class, ['linesCountBefore' => 0, 'linesCountAfter' => 1]) - ->withConfiguredRule(SlevomatCodingStandard\Sniffs\Classes\PropertySpacingSniff::class, ['minLinesCountBeforeWithComment' => 1, 'maxLinesCountBeforeWithComment' => 1, 'minLinesCountBeforeWithoutComment' => 0, 'maxLinesCountBeforeWithoutComment' => 0]) + ->withConfiguredRule(SlevomatCodingStandard\Sniffs\Classes\PropertySpacingSniff::class, ['minLinesCountBeforeWithComment' => 1, 'maxLinesCountBeforeWithComment' => 1, 'minLinesCountBeforeWithoutComment' => 1, 'maxLinesCountBeforeWithoutComment' => 1]) ->withConfiguredRule(SlevomatCodingStandard\Sniffs\Classes\TraitUseSpacingSniff::class, ['linesCountBeforeFirstUse' => 0, 'linesCountBeforeFirstUseWhenFirstInClass' => 0, 'linesCountBetweenUses' => 0, 'linesCountAfterLastUse' => 1, 'linesCountAfterLastUseWhenLastInClass' => 1]) ->withConfiguredRule(SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class, ['linesCountBeforeFirstContent' => 0, 'linesCountBetweenDescriptionAndAnnotations' => 1, 'linesCountBetweenDifferentAnnotationsTypes' => 0, 'linesCountAfterLastContent' => 0]) ->withConfiguredRule(SlevomatCodingStandard\Sniffs\ControlStructures\BlockControlStructureSpacingSniff::class, ['linesCountBefore' => 1, 'linesCountBeforeFirst' => 1, 'linesCountAfter' => 1, 'linesCountAfterLast' => 1, 'controlStructures' => ['if', 'switch', 'for', 'foreach', 'while', 'do']]) @@ -327,4 +327,29 @@ SlevomatCodingStandard\Sniffs\Variables\DisallowSuperGlobalVariableSniff::class, SlevomatCodingStandard\Sniffs\Variables\DuplicateAssignmentToVariableSniff::class, SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff::class, + ]) + ->withSkip([ + PhpCsFixer\Fixer\AttributeNotation\OrderedAttributesFixer::class => [ + getcwd() . '/app/Data', + ], + SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff::class => [ + getcwd() . '/app/Models', + getcwd() . '/app/Policies', + getcwd() . '/app/Repositories/QuerySorts', + getcwd() . '/app/Scopes', + getcwd() . '/app/Traits', + getcwd() . '/app/Data/Casts', + getcwd() . '/app/Providers', + ], + SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff::class => [ + getcwd() . '/app/Console/Commands', + getcwd() . '/app/Models', + ], + SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff::class => [ + getcwd() . '/app/Data/Casts', + getcwd() . '/app/Models/User/User.php', + ], + SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff::class => [ + getcwd() . '/app/Models/User/User.php', + ], ]);