-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs.dist
119 lines (116 loc) · 4.33 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
/**
* Last processed php-cs-fixer release: v2.13.0.
*
* @see https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases
*/
$finder = Finder::create()
->in(__DIR__)
->exclude('tmp')
->append(['convert', 'csv2qif', 'help', 'validate']);
return Config::create()
->setFinder($finder)
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short',
],
'binary_operator_spaces' => [
'default' => 'align_single_space_minimal',
],
'blank_line_before_statement' => [
'statements' => [
'break', 'continue', 'case', 'declare', 'default', 'do', 'for', 'foreach',
'if', 'return', 'switch', 'throw', 'try', 'while', 'yield',
],
],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'combine_nested_dirname' => true,
'compact_nullable_typehint' => true,
'concat_space' => [
'spacing' => 'one',
],
'dir_constant' => true,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'fully_qualified_strict_types' => true,
'function_to_constant' => true,
'header_comment' => [
'header' => '',
],
'increment_style' => [
'style' => 'post',
],
'is_null' => [
'use_yoda_style' => false,
],
'list_syntax' => [
'syntax' => 'short',
],
'method_chaining_indentation' => true,
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => true,
'no_alias_functions' => true,
'no_alternative_syntax' => true,
'no_extra_blank_lines' => [
'tokens' => [
'break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block',
'return', 'square_brace_block', 'throw', 'use_trait',
// TODO: Add 'use' when php-cs-fixer #3582 is fixed
],
],
'no_null_property_initialization' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => true,
'no_unset_on_property' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => [
'imports_order' => ['class', 'function', 'const'],
],
'php_unit_construct' => true,
'php_unit_dedicate_assert' => [
'target' => 'newest',
],
'php_unit_expectation' => true,
'php_unit_no_expectation_annotation' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_test_annotation' => true,
'php_unit_test_case_static_method_calls' => [
'call_type' => 'self',
],
'phpdoc_no_alias_tag' => [
'replacements' => [
'link' => 'see',
'type' => 'var',
],
],
'phpdoc_order' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
],
'pow_to_exponentiation' => true,
'return_assignment' => true,
'simplified_null_return' => true,
'single_class_element_per_statement' => true,
'space_after_semicolon' => [
'remove_in_empty_for_expressions' => true,
],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
]);