Update PHP-CS-Fixer configuration

This commit is contained in:
Giuseppe Criscione 2023-12-11 00:26:23 +01:00
parent 4afb548a40
commit 800c8dfab1

View File

@ -4,35 +4,33 @@ namespace PhpCsFixer;
$finder = Finder::create()
->in(__DIR__)
->exclude(['formwork/views', 'panel/views', 'site/templates']);
->exclude(['formwork/views', 'panel/node_modules', 'panel/views', 'site/templates']);
$config = new Config();
return $config
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'@PER-CS2.0' => true,
'@PHP83Migration' => true,
'array_syntax' => true,
'binary_operator_spaces' => ['default' => 'single_space', 'operators' => ['=>' => 'align_single_space_minimal']],
'cast_spaces' => ['space' => 'single'],
'cast_spaces' => true,
'class_attributes_separation' => true,
'concat_space' => ['spacing' => 'one'],
'escape_implicit_backslashes' => true,
'fully_qualified_strict_types' => true,
'function_declaration' => true,
'include' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_null_property_initialization' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => true,
'no_trailing_comma_in_singleline' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_braces' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'nullable_type_declaration_for_default_null_value' => true,
@ -51,6 +49,7 @@ return $config
'phpdoc_trim' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
'phpdoc_var_without_name' => true,
'single_line_empty_body' => false,
'single_quote' => true,
'trailing_comma_in_multiline' => true,
])