-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecs.php
More file actions
53 lines (48 loc) · 1.86 KB
/
ecs.php
File metadata and controls
53 lines (48 loc) · 1.86 KB
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
50
51
52
53
<?php
declare(strict_types=1);
/**
* This file is part of fast-forward/dev-tools.
*
* This source file is subject to the license bundled
* with this source code in the file LICENSE.
*
* @copyright Copyright (c) 2026 Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
* @license https://opensource.org/licenses/MIT MIT License
*
* @see https://github.com/php-fast-forward/dev-tools
* @see https://github.com/php-fast-forward
* @see https://datatracker.ietf.org/doc/html/rfc2119
*/
use PhpCsFixer\Fixer\Import\GlobalNamespaceImportFixer;
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer;
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestCaseStaticMethodCallsFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use function Safe\getcwd;
return ECSConfig::configure()
->withPaths([getcwd()])
->withSkip([
getcwd() . '/public',
getcwd() . '/resources',
getcwd() . '/vendor',
getcwd() . '/tmp',
PhpdocToCommentFixer::class,
NoSuperfluousPhpdocTagsFixer::class,
NoEmptyPhpdocFixer::class,
PhpdocNoEmptyReturnFixer::class,
GlobalNamespaceImportFixer::class,
GeneralPhpdocAnnotationRemoveFixer::class,
])
->withRootFiles()
->withPhpCsFixerSets(symfony: true, symfonyRisky: true, auto: true, autoRisky: true)
->withPreparedSets(psr12: true, common: true, symplify: true, strict: true, cleanCode: true)
->withConfiguredRule(PhpdocAlignFixer::class, [
'align' => 'left',
])
->withConfiguredRule(PhpUnitTestCaseStaticMethodCallsFixer::class, [
'call_type' => 'self',
]);