Repository navigation
Expand file tree
/
Copy pathecs.php
More file actions
49 lines (45 loc) · 1.49 KB
/
Copy pathecs.php
File metadata and controls
49 lines (45 loc) · 1.49 KB
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
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\CastNotation\CastSpacesFixer;
use PhpCsFixer\Fixer\Import\GlobalNamespaceImportFixer;
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer;
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer;
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withRules([
NoUnusedImportsFixer::class,
])
->withPreparedSets(
spaces: true,
arrays: true,
docblocks: true,
namespaces: true,
comments: true,
psr12: true,
)
->withConfiguredRule(CastSpacesFixer::class, [
'space' => 'none',
])
->withConfiguredRule(OrderedImportsFixer::class, [
'imports_order' => ['class', 'function', 'const'],
'sort_algorithm' => 'alpha',
])
->withConfiguredRule(GlobalNamespaceImportFixer::class, [
'import_constants' => true,
'import_classes' => null,
'import_functions' => true,
])
->withSkip([
ArrayListItemNewlineFixer::class,
ArrayOpenerAndCloserNewlineFixer::class,
NotOperatorWithSuccessorSpaceFixer::class,
PhpdocLineSpanFixer::class,
]);