Skip to content

Commit dd37c93

Browse files
committed
add ecs
1 parent 01c802b commit dd37c93

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,10 @@
2525
"require-dev": {
2626
"symplify/easy-coding-standard": "^9.1",
2727
"phpstan/phpstan": "^0.12.73"
28+
},
29+
"scripts": {
30+
"check-cs": "vendor/bin/ecs check --ansi",
31+
"fix-cs": "vendor/bin/ecs check --fix --ansi",
32+
"phpstan": "vendor/bin/phpstan analyse --ansi"
2833
}
2934
}

ecs.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6+
use Symplify\EasyCodingStandard\ValueObject\Option;
7+
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
8+
9+
return static function (ContainerConfigurator $containerConfigurator): void {
10+
$parameters = $containerConfigurator->parameters();
11+
$parameters->set(Option::PATHS, [
12+
__DIR__ . '/src',
13+
__DIR__ . '/tests',
14+
]);
15+
16+
$parameters->set(Option::SETS, [
17+
// run and fix, one by one
18+
SetList::COMMON,
19+
SetList::PSR_12,
20+
]);
21+
};

0 commit comments

Comments
 (0)