Skip to content

Commit 0d0794c

Browse files
Update PHP-CS-Fixer configuration
1 parent d3ea52b commit 0d0794c

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.php-cs-fixer.dist.php

+24-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
'explicit_string_variable' => true,
100100
'fopen_flag_order' => true,
101101
'full_opening_tag' => true,
102-
'fully_qualified_strict_types' => true,
102+
'fully_qualified_strict_types' => ['import_symbols' => true],
103103
'function_declaration' => true,
104104
'function_to_constant' => true,
105105
'get_class_to_class_keyword' => true,
@@ -135,7 +135,7 @@
135135
'modernize_types_casting' => true,
136136
'multiline_comment_opening_closing' => true,
137137
'multiline_whitespace_before_semicolons' => true,
138-
'native_constant_invocation' => false,
138+
'native_constant_invocation' => true,
139139
'native_function_casing' => false,
140140
'native_function_invocation' => [
141141
'include' => [
@@ -158,7 +158,23 @@
158158
'no_empty_comment' => true,
159159
'no_empty_phpdoc' => true,
160160
'no_empty_statement' => true,
161-
'no_extra_blank_lines' => true,
161+
'no_extra_blank_lines' => [
162+
'tokens' => [
163+
'attribute',
164+
'break',
165+
'case',
166+
'continue',
167+
'curly_brace_block',
168+
'default',
169+
'extra',
170+
'parenthesis_brace_block',
171+
'return',
172+
'square_brace_block',
173+
'switch',
174+
'throw',
175+
'use',
176+
],
177+
],
162178
'no_homoglyph_names' => true,
163179
'no_leading_import_slash' => true,
164180
'no_leading_namespace_whitespace' => true,
@@ -197,6 +213,7 @@
197213
'no_whitespace_in_blank_line' => true,
198214
'non_printable_character' => true,
199215
'normalize_index_brace' => true,
216+
'nullable_type_declaration_for_default_null_value' => true,
200217
'object_operator_without_whitespace' => true,
201218
'octal_notation' => true,
202219
'operator_linebreak' => [
@@ -340,4 +357,8 @@
340357
'whitespace_after_comma_in_array' => true,
341358
]);
342359

360+
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . json_decode((string) @file_get_contents('composer.json'), true)["extra"]["branch-alias"]["dev-main"] ?? 'unknown');
361+
362+
$config->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
363+
343364
return $config;

0 commit comments

Comments
 (0)