This repository has been archived by the owner on May 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathecs.php
49 lines (44 loc) · 1.92 KB
/
ecs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
declare(strict_types=1);
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\ClassCommentSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FileCommentSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentThrowTagSniff;
use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer;
use PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer;
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer;
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer;
use Symplify\CodingStandard\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (ECSConfig $containerConfigurator): void {
$containerConfigurator->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
// run and fix, one by one
$containerConfigurator->import('vendor/whatwedo/php-coding-standard/config/whatwedo-symfony.php');
$containerConfigurator->skip([
FileCommentSniff::class,
ClassCommentSniff::class,
FunctionCommentThrowTagSniff::class,
ValidClassNameSniff::class => [
__DIR__ . '/src/whatwedoCrudBundle.php',
__DIR__ . '/src/DependencyInjection/whatwedoCrudExtension.php',
],
TrailingCommaInMultilineFixer::class => [
__DIR__ . '/tests/App/config/bundles.php',
],
ArrayIndentationFixer::class => [
__DIR__ . '/tests/App/config/bundles.php',
],
ArrayListItemNewlineFixer::class => [
__DIR__ . '/tests/App/config/bundles.php',
],
StandaloneLineInMultilineArrayFixer::class => [
__DIR__ . '/tests/App/config/bundles.php',
],
ArrayOpenerAndCloserNewlineFixer::class => [
__DIR__ . '/tests/App/config/bundles.php',
],
]);
};