Skip to content

Commit ceb45aa

Browse files
TomasVotrubastaabm
authored andcommitted
replace cs fixer with ecs
1 parent de7782a commit ceb45aa

File tree

3 files changed

+33
-34
lines changed

3 files changed

+33
-34
lines changed

.php-cs-fixer.dist.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"ext-pdo": "*",
1515
"dibi/dibi": "^4.2",
1616
"doctrine/dbal": "^2.13|^3.0",
17-
"friendsofphp/php-cs-fixer": "3.4.0",
1817
"php-parallel-lint/php-parallel-lint": "^1.3",
1918
"phpstan/extension-installer": "^1.2",
2019
"phpstan/phpstan-php-parser": "^1.1",
2120
"phpstan/phpstan-phpunit": "^1.0",
2221
"phpstan/phpstan-strict-rules": "^1.1",
2322
"phpunit/phpunit": "^8.5|^9.5",
23+
"symplify/easy-coding-standard": "^11.2",
2424
"tomasvotruba/unused-public": "^0.0.34",
2525
"vlucas/phpdotenv": "^5.4"
2626
},

ecs.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
6+
use Symplify\EasyCodingStandard\Config\ECSConfig;
7+
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
8+
9+
return function (ECSConfig $ecsConfig): void {
10+
$ecsConfig->paths([
11+
__DIR__ . '/src',
12+
__DIR__ . '/tests',
13+
__DIR__ . '/ecs.php',
14+
__DIR__ . '/bootstrap.php',
15+
]);
16+
17+
$ecsConfig->skip([
18+
'*/data/*'
19+
]);
20+
21+
// this way you can add sets - group of rules
22+
$ecsConfig->sets([
23+
// run and fix, one by one
24+
SetList::SPACES,
25+
SetList::ARRAY,
26+
SetList::STRICT,
27+
SetList::DOCBLOCK,
28+
SetList::NAMESPACES,
29+
SetList::COMMENTS,
30+
SetList::PSR_12,
31+
]);
32+
};

0 commit comments

Comments
 (0)