-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.php-cs-fixer.dist.php
73 lines (61 loc) · 2.06 KB
/
.php-cs-fixer.dist.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
->exclude('node_modules')
->notPath('config/bundles.php')
->notPath('config/bootstrap.php')
->notPath('config/preload.php')
->notPath('public/index.php')
->notPath('src/Kernel.php')
->notPath('tests/bootstrap.php')
# Codeception
->exclude('tests/_data')
->exclude('tests/_output')
->exclude('tests/_support/_generated')
;
return (new PhpCsFixer\Config())
->setLineEnding("\n") // Linux LF line ending
->setRiskyAllowed(true)
->setRules([
// Use risky rules for new projects only
// Uncomment @PHPx rules up to target PHP version
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'php_unit_internal_class' => false,
'php_unit_method_casing' => false,
'php_unit_test_class_requires_covers' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'ordered_class_elements' => [
'order' => [
'use_trait', // traits
'constant_public', // constants
'constant_protected',
'constant_private',
'property_public_static', // static properties
'property_protected_static',
'property_private_static',
'property_public', // properties
'property_protected',
'property_private',
'construct', // magic methods
'destruct',
'magic',
'phpunit', // PHPUnit
'method_public_static', // static methods
'method_protected_static',
'method_private_static',
'method_public', // methods
'method_protected',
'method_private',
],
'sort_algorithm' => 'none',
],
])
->setFinder($finder)
;