Skip to content

Commit 07ffdad

Browse files
Update PHP-CS-Fixer configuration
1 parent 0becbb4 commit 07ffdad

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.php_cs.dist

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ For the full copyright and license information, please view the LICENSE
88
file that was distributed with this source code.
99
EOF;
1010

11-
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
11+
$finder = PhpCsFixer\Finder::create()
12+
->files()
13+
->in(__DIR__ . '/src')
14+
->in(__DIR__ . '/tests');
1215

1316
return PhpCsFixer\Config::create()
1417
->setFinder($finder)
@@ -59,6 +62,11 @@ return PhpCsFixer\Config::create()
5962
'encoding' => true,
6063
'full_opening_tag' => true,
6164
'function_declaration' => true,
65+
'global_namespace_import' => [
66+
'import_classes' => true,
67+
'import_constants' => true,
68+
'import_functions' => true,
69+
],
6270
'header_comment' => ['header' => $header, 'separate' => 'none'],
6371
'indentation_type' => true,
6472
'is_null' => true,
@@ -74,9 +82,9 @@ return PhpCsFixer\Config::create()
7482
'modernize_types_casting' => true,
7583
'multiline_comment_opening_closing' => true,
7684
'multiline_whitespace_before_semicolons' => true,
77-
'native_constant_invocation' => true,
78-
'native_function_casing' => true,
79-
'native_function_invocation' => true,
85+
'native_constant_invocation' => false,
86+
'native_function_casing' => false,
87+
'native_function_invocation' => false,
8088
'new_with_braces' => false,
8189
'no_alias_functions' => true,
8290
'no_alternative_syntax' => true,
@@ -101,7 +109,9 @@ return PhpCsFixer\Config::create()
101109
'no_spaces_after_function_name' => true,
102110
'no_spaces_inside_parenthesis' => true,
103111
'no_superfluous_elseif' => true,
104-
'no_superfluous_phpdoc_tags' => true,
112+
'no_superfluous_phpdoc_tags' => [
113+
'allow_mixed' => true,
114+
],
105115
'no_trailing_comma_in_list_call' => true,
106116
'no_trailing_comma_in_singleline_array' => true,
107117
'no_trailing_whitespace' => true,
@@ -143,12 +153,18 @@ return PhpCsFixer\Config::create()
143153
'method_private_static',
144154
],
145155
],
146-
'ordered_imports' => true,
156+
'ordered_imports' => [
157+
'imports_order' => [
158+
PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CONST,
159+
PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_FUNCTION,
160+
PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CLASS,
161+
]
162+
],
147163
'ordered_interfaces' => [
148164
'direction' => 'ascend',
149165
'order' => 'alpha',
150166
],
151-
'phpdoc_add_missing_param_annotation' => true,
167+
'phpdoc_add_missing_param_annotation' => false,
152168
'phpdoc_align' => true,
153169
'phpdoc_annotation_without_dot' => true,
154170
'phpdoc_indent' => true,
@@ -160,6 +176,7 @@ return PhpCsFixer\Config::create()
160176
'phpdoc_scalar' => true,
161177
'phpdoc_separation' => true,
162178
'phpdoc_single_line_var_spacing' => true,
179+
'phpdoc_summary' => true,
163180
'phpdoc_to_comment' => true,
164181
'phpdoc_trim' => true,
165182
'phpdoc_trim_consecutive_blank_line_separation' => true,

0 commit comments

Comments
 (0)