-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.php
29 lines (24 loc) · 1021 Bytes
/
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
<?php
declare(strict_types=1);
use Contao\EasyCodingStandard\Fixer\NoLineBreakBetweenMethodArgumentsFixer;
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitExpectationFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->sets([__DIR__.'/vendor/contao/easy-coding-standard/config/contao.php']);
$ecsConfig->skip([NoLineBreakBetweenMethodArgumentsFixer::class, HeaderCommentFixer::class]);
$ecsConfig->lineEnding("\n");
/* TODO once we have a header, we can use this
* $ecsConfig->ruleWithConfiguration(, [
* 'header' => "",
* ]);
*/
if (PHP_VERSION_ID < 80000) {
$ecsConfig->ruleWithConfiguration(
TrailingCommaInMultilineFixer::class,
['elements' => ['arrays'], 'after_heredoc' => true]
);
$ecsConfig->skip([PhpUnitExpectationFixer::class]);
}
};