-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
74 lines (71 loc) · 2.08 KB
/
.php-cs-fixer.php
File metadata and controls
74 lines (71 loc) · 2.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
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
<?php
$finder = PhpCsFixer\Finder::create()->in([
__DIR__.'/src',
__DIR__.'/meta',
__DIR__.'/tests'
]);
$config = new PhpCsFixer\Config();
$config->setRules([
'@PSR2' => true,
'binary_operator_spaces' => [
'operators' => [
'=' => 'single_space',
'=>' => 'single_space'
]
],
'ordered_imports' => true,
'no_leading_import_slash' => true,
'phpdoc_order' => true,
'visibility_required' => false,
'no_extra_blank_lines' => true,
'class_attributes_separation' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_whitespace_in_blank_line' => true,
'no_spaces_inside_parenthesis' => true,
'phpdoc_no_package' => true,
'phpdoc_separation' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'no_spaces_around_offset' => true,
'no_blank_lines_after_phpdoc' => true,
'no_blank_lines_after_class_opening' => true,
'function_typehint_space' => true,
'single_quote' => true,
'cast_spaces' => true,
'blank_line_before_statement' => false,
'blank_line_after_opening_tag' => true,
'no_empty_statement' => true,
'multiline_whitespace_before_semicolons' => true,
'concat_space' => [
'spacing' => 'none'
],
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'method_static',
'magic',
'phpunit',
'method'
]
],
'declare_equal_normalize' => true,
'array_syntax' => [
'syntax' => 'short'
]
])
->setFinder($finder);
return $config;