-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
38 lines (30 loc) · 1.08 KB
/
Copy path.php-cs-fixer.php
File metadata and controls
38 lines (30 loc) · 1.08 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
<?php
use Ergebnis\PhpCsFixer\Config;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet\Php84;
$header = <<<'EOF'
Copyright (c) 2025 Kai Sassnowski
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
@see https://github.com/ksassnowski/utgars-chronicles.app
EOF;
$ruleSet = Php84::create()
->withHeader($header)
->withRules(Rules::fromArray([
'final_class' => false,
'final_public_method_for_abstract_class' => false,
'phpdoc_to_property_type' => false,
'php_unit_test_class_requires_covers' => false,
'class_attributes_separation' => [
'elements' => [
'const' => 'only_if_meta',
'method' => 'one',
'property' => 'one',
'trait_import' => 'none',
],
],
]));
$config = Config\Factory::fromRuleSet($ruleSet);
$config->getFinder()->in([__DIR__.'/app', __DIR__.'/tests']);
$config->setCacheFile(__DIR__.'/.build/php-cs-fixer/.php-cs-fixer.cache');
return $config;