-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php_cs
89 lines (85 loc) · 2.47 KB
/
.php_cs
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'var'
]);
$config = PhpCsFixer\Config::create()
->setFinder($finder)
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => [
'statements' => [
'break',
'continue',
'declare',
'do',
'for',
'foreach',
'if',
'include',
'include_once',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
'while',
'yield',
],
],
'class_attributes_separation' => [
'elements' => [
'method',
'property',
],
],
'concat_space' => ['spacing' => 'one'],
'doctrine_annotation_indentation' => true,
'doctrine_annotation_spaces' => [
'after_argument_assignments' => false,
'after_array_assignments_colon' => true,
'after_array_assignments_equals' => false,
'around_parentheses' => true,
'before_argument_assignments' => false,
'before_array_assignments_colon' => false,
'before_array_assignments_equals' => false,
],
'header_comment' => [
'header' => '',
],
'list_syntax' => [
'syntax' => 'short',
],
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'native_function_invocation' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'ordered_class_elements' => true,
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => ['class', 'const', 'function'],
],
'phpdoc_order' => true,
'phpdoc_to_comment' => false,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
],
'self_accessor' => true,
'visibility_required' => [
'elements' => [
'const',
'method',
'property',
],
],
])
;
$config->setCacheFile('var/.php_cs.cache');
return $config;