Update PHP-CS-Fixer configuration
This commit is contained in:
parent
eef6615990
commit
ffe1363671
|
|
@ -99,7 +99,7 @@ $config->setFinder($finder)
|
||||||
'explicit_string_variable' => true,
|
'explicit_string_variable' => true,
|
||||||
'fopen_flag_order' => true,
|
'fopen_flag_order' => true,
|
||||||
'full_opening_tag' => true,
|
'full_opening_tag' => true,
|
||||||
'fully_qualified_strict_types' => true,
|
'fully_qualified_strict_types' => ['import_symbols' => true],
|
||||||
'function_declaration' => true,
|
'function_declaration' => true,
|
||||||
'function_to_constant' => true,
|
'function_to_constant' => true,
|
||||||
'get_class_to_class_keyword' => true,
|
'get_class_to_class_keyword' => true,
|
||||||
|
|
@ -135,7 +135,7 @@ $config->setFinder($finder)
|
||||||
'modernize_types_casting' => true,
|
'modernize_types_casting' => true,
|
||||||
'multiline_comment_opening_closing' => true,
|
'multiline_comment_opening_closing' => true,
|
||||||
'multiline_whitespace_before_semicolons' => true,
|
'multiline_whitespace_before_semicolons' => true,
|
||||||
'native_constant_invocation' => false,
|
'native_constant_invocation' => true,
|
||||||
'native_function_casing' => false,
|
'native_function_casing' => false,
|
||||||
'native_function_invocation' => [
|
'native_function_invocation' => [
|
||||||
'include' => [
|
'include' => [
|
||||||
|
|
@ -158,7 +158,23 @@ $config->setFinder($finder)
|
||||||
'no_empty_comment' => true,
|
'no_empty_comment' => true,
|
||||||
'no_empty_phpdoc' => true,
|
'no_empty_phpdoc' => true,
|
||||||
'no_empty_statement' => true,
|
'no_empty_statement' => true,
|
||||||
'no_extra_blank_lines' => true,
|
'no_extra_blank_lines' => [
|
||||||
|
'tokens' => [
|
||||||
|
'attribute',
|
||||||
|
'break',
|
||||||
|
'case',
|
||||||
|
'continue',
|
||||||
|
'curly_brace_block',
|
||||||
|
'default',
|
||||||
|
'extra',
|
||||||
|
'parenthesis_brace_block',
|
||||||
|
'return',
|
||||||
|
'square_brace_block',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'use',
|
||||||
|
],
|
||||||
|
],
|
||||||
'no_homoglyph_names' => true,
|
'no_homoglyph_names' => true,
|
||||||
'no_leading_import_slash' => true,
|
'no_leading_import_slash' => true,
|
||||||
'no_leading_namespace_whitespace' => true,
|
'no_leading_namespace_whitespace' => true,
|
||||||
|
|
@ -197,6 +213,7 @@ $config->setFinder($finder)
|
||||||
'no_whitespace_in_blank_line' => true,
|
'no_whitespace_in_blank_line' => true,
|
||||||
'non_printable_character' => true,
|
'non_printable_character' => true,
|
||||||
'normalize_index_brace' => true,
|
'normalize_index_brace' => true,
|
||||||
|
'nullable_type_declaration_for_default_null_value' => true,
|
||||||
'object_operator_without_whitespace' => true,
|
'object_operator_without_whitespace' => true,
|
||||||
'octal_notation' => true,
|
'octal_notation' => true,
|
||||||
'operator_linebreak' => [
|
'operator_linebreak' => [
|
||||||
|
|
@ -340,6 +357,8 @@ $config->setFinder($finder)
|
||||||
'whitespace_after_comma_in_array' => true,
|
'whitespace_after_comma_in_array' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . sha1(@trim((string) @shell_exec('git rev-parse --abbrev-ref HEAD'))));
|
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . json_decode((string) @file_get_contents('composer.json'), true)["extra"]["branch-alias"]["dev-main"] ?? 'unknown');
|
||||||
|
|
||||||
|
$config->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue