-
Notifications
You must be signed in to change notification settings - Fork 2
/
ecs.php
54 lines (44 loc) · 1.45 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
50
51
52
53
54
<?php
/*
* This file is part of SyliusFixturesPlugin.
*
* (c) Akawaka
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->paths([
__DIR__ . '/config',
__DIR__ . '/src',
__DIR__ . '/tests/Behat',
__DIR__ . '/tests/Doctrine',
__DIR__ . '/tests/Foundry',
__DIR__ . '/tests/PurgeDatabaseTrait.php',
__DIR__ . '/ecs.php',
]);
$ecsConfig->import('vendor/sylius-labs/coding-standard/ecs.php');
$ecsConfig->skip(skips: [
VisibilityRequiredFixer::class => ['*Spec.php'],
MethodArgumentSpaceFixer::class => ['config/services/*'],
]);
$header = <<<EOM
This file is part of SyliusFixturesPlugin.
(c) Akawaka
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOM;
$services = $ecsConfig->services();
$services
->set(HeaderCommentFixer::class)
->call('configure', [[
'header' => $header,
'location' => 'after_open',
]])
;
};