Skip to content

Commit 83b5984

Browse files
committed
fixup! Add ECS
1 parent 5a13db2 commit 83b5984

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

.github/workflows/coding-standard.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ jobs:
88
coding-standard:
99
name: Coding Standard
1010
uses: brick/coding-standard/.github/workflows/coding-standard.yml@main
11+
with:
12+
php-version: "8.2"

tools/ecs/ecs.php

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?php
22

33
declare(strict_types=1);
4-
54
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentSniff;
6-
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
7-
use SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff;
8-
use SlevomatCodingStandard\Sniffs\Namespaces\UseSpacingSniff;
5+
use PhpCsFixer\Fixer\ClassNotation\OrderedTypesFixer;
6+
use PhpCsFixer\Fixer\Phpdoc\PhpdocTypesOrderFixer;
7+
use SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff;
98
use SlevomatCodingStandard\Sniffs\Whitespaces\DuplicateSpacesSniff;
109
use Symplify\EasyCodingStandard\Config\ECSConfig;
1110

@@ -26,13 +25,6 @@
2625

2726
// PHP-CS-Fixer
2827
$ecsConfig->skip([
29-
// Allows tree building method chaining syntax for better readability
30-
MethodChainingIndentationFixer::class => [$libRootPath . '/src/Parser/IsoParsers.php'],
31-
32-
// Allows microtime() to be called from class namespace so that it can be overridden
33-
// and its return value mocked in SystemClockTest
34-
ReferenceUsedNamesOnlySniff::class => [$libRootPath . '/src/Clock/SystemClock.php'],
35-
3628
// Only interested in FunctionCommentSniff.ParamCommentFullStop, excludes the rest
3729
FunctionCommentSniff::class . '.Missing' => null,
3830
FunctionCommentSniff::class . '.MissingReturn' => null,
@@ -47,8 +39,9 @@
4739
// Allows alignment in test providers
4840
DuplicateSpacesSniff::class => [$libRootPath . '/tests'],
4941

50-
// Keep a line between same use types, spacing around uses is done in other fixers
51-
UseSpacingSniff::class . '.IncorrectLinesCountBeforeFirstUse' => null,
52-
UseSpacingSniff::class . '.IncorrectLinesCountAfterLastUse' => null,
42+
OrderedTypesFixer::class => null,
43+
PhpdocTypesOrderFixer::class => null,
44+
45+
DocCommentSpacingSniff::class . '.IncorrectAnnotationsGroup' => null,
5346
]);
5447
};

0 commit comments

Comments
 (0)