-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs.dist
57 lines (50 loc) · 1.87 KB
/
.php_cs.dist
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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('build')
->exclude('vendor');
$header = <<<EOF
This file is part of the Evc Bundle.
PHP version 7.1|7.2|7.3|7.4
Symfony version 4.4|5.0|5.1
(c) Alexandre Tranchant <[email protected]>
@author Alexandre Tranchant <[email protected]>
@copyright 2020 Alexandre Tranchant
@license MIT https://spdx.org/licenses/MIT.html
EOF;
return PhpCsFixer\Config::create()
->setCacheFile(__DIR__.'/.php_cs.cache')
->setRules([
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'@Symfony' => true,
'@PHPUnit60Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
// 'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'location' => 'after_open',
'separate' => 'bottom'
],
'date_time_immutable' => true,
'declare_strict_types' => true,
'is_null' => true,
'no_alias_functions' =>true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public', 'constant_protected', 'constant_private', 'constant',
'property_public_static', 'property_protected_static', 'property_private_static', 'property_static',
'property_public', 'property_protected', 'property_private', 'property',
'construct', 'destruct',
'phpunit',
'method_public_static', 'method_protected_static', 'method_private_static', 'method_static',
'method_public', 'method_protected', 'method_private', 'method', 'magic'
],
'sortAlgorithm' => 'alpha'
]
])
->setFinder($finder);