-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathphp_cs.php
98 lines (94 loc) · 3.08 KB
/
php_cs.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
return PhpCsFixer\Config::create()
->setRules([
'psr0' => false,
'@PSR2' => true,
'array_syntax' => [
'syntax' => 'short',
],
'no_unreachable_default_argument_value' => false,
'braces' => [
'allow_single_line_closure' => false,
],
'binary_operator_spaces' => [
'align_double_arrow' => false,
'align_equals' => false,
],
'trailing_comma_in_multiline_array' => true,
'whitespace_after_comma_in_array' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_return' => true,
'cast_spaces' => [
'space' => 'single',
],
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
'method_separation' => true,
'new_with_braces' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_unused_imports' => true,
'phpdoc_align' => false,
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_separation' => true,
'phpdoc_trim' => true,
'method_argument_space' => [
'ensure_fully_multiline' => true,
'keep_multiple_spaces_after_comma' => true,
],
'single_quote' => true,
'phpdoc_no_empty_return' => false,
'single_blank_line_before_namespace' => true,
'blank_line_before_statement' => [
'statements' => [
'break', 'continue', 'declare', 'return', 'throw', 'try',
],
],
'class_attributes_separation' => true,
'concat_space' => [
'spacing' => 'one',
],
'declare_equal_normalize' => [
'space' => 'single',
],
'no_spaces_inside_parenthesis' => true,
'ternary_operator_spaces' => true,
'no_leading_import_slash' => true,
// @PHP71Migration
'ternary_to_null_coalescing' => true,
'visibility_required' => true,
// @PHP71Migration:risky
'void_return' => true,
'random_api_migration' => true,
'pow_to_exponentiation' => true,
// @Symfony:risky
'dir_constant' => true,
'function_to_constant' => true,
'is_null' => true,
'modernize_types_casting' => true,
'no_alias_functions' => true,
])
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'bootstrap/cache',
'bower_components',
'node_modules',
'tasks',
'public',
'bin',
'storage',
'vendor',
])
->notPath('_ide_helper_models.php')
->notPath('_ide_helper.php')
->notPath('.phpstorm.meta.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
);