-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathecs.php
More file actions
61 lines (57 loc) · 1.98 KB
/
ecs.php
File metadata and controls
61 lines (57 loc) · 1.98 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
50
51
52
53
54
55
56
57
58
59
60
61
<?php
declare(strict_types=1);
/**
* @copyright (C) 2026 https://mySites.guru + Phil E. Taylor <phil@phil-taylor.com>
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @link https://github.com/mySites-guru/HealthCheckerForJoomla
*/
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withPaths([__DIR__ . '/healthchecker', __DIR__ . '/tests', __DIR__ . '/rector.php', __DIR__ . '/ecs.php'])
->withSkip([
// Skip language files
'*/language/*',
// Skip XML files
'*.xml',
// Skip media files
'*/media/*',
// Skip tmpl files (Joomla templates)
'*/tmpl/*',
])
->withRules([
ArraySyntaxFixer::class,
NoUnusedImportsFixer::class,
OrderedImportsFixer::class,
ArrayIndentationFixer::class,
BinaryOperatorSpacesFixer::class,
])
->withConfiguredRule(HeaderCommentFixer::class, [
'header' => <<<'HEADER'
@copyright (C) 2026 https://mySites.guru + Phil E. Taylor <phil@phil-taylor.com>
@license GNU General Public License version 2 or later; see LICENSE.txt
@link https://github.com/mySites-guru/HealthCheckerForJoomla
HEADER
,
'comment_type' => 'PHPDoc',
'location' => 'after_declare_strict',
'separate' => 'both',
])
->withPreparedSets(
psr12: true,
arrays: true,
comments: true,
docblocks: true,
spaces: true,
namespaces: true,
controlStructures: true,
strict: true,
symplify: true,
cleanCode: true,
)
->withPhpCsFixerSets(perCS20: true);