-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathecs.php
46 lines (37 loc) · 1.06 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
<?php
/*
* (c) 2015-2024 Julián Gutiérrez <[email protected]>
*
* @license BSD-3-Clause
* @link https://github.com/juliangut/slim-php-di
*/
declare(strict_types=1);
use Jgut\ECS\Config\ConfigSet80;
use PhpCsFixer\Fixer\Basic\CurlyBracesPositionFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
$skips = [];
if (\PHP_VERSION_ID < 80_100) {
$skips[CurlyBracesPositionFixer::class] = __DIR__ . '/src/CallableResolver.php';
}
$configSet = (new ConfigSet80())
->setHeader(<<<'HEADER'
(c) 2015-{{year}} Julián Gutiérrez <[email protected]>
@license BSD-3-Clause
@link https://github.com/juliangut/slim-php-di
HEADER)
->enablePhpUnitRules()
->setAdditionalSkips($skips);
$paths = [
__FILE__,
__DIR__ . '/src',
__DIR__ . '/tests',
];
if (!method_exists(ECSConfig::class, 'configure')) {
return static function (ECSConfig $ecsConfig) use ($configSet, $paths): void {
$ecsConfig->paths($paths);
$configSet->configure($ecsConfig);
};
}
return $configSet
->configureBuilder()
->withPaths($paths);