mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Group more style rules under PSR-12
This commit is contained in:
parent
e60f7ea03f
commit
7777ff962f
1 changed files with 14 additions and 12 deletions
16
.php_cs.dist
16
.php_cs.dist
|
@ -25,20 +25,16 @@ $rules = [
|
||||||
],
|
],
|
||||||
'cast_spaces' => ['space' => "single"],
|
'cast_spaces' => ['space' => "single"],
|
||||||
'concat_space' => ['spacing' => "none"],
|
'concat_space' => ['spacing' => "none"],
|
||||||
'function_typehint_space' => true,
|
|
||||||
'list_syntax' => ['syntax' => "short"],
|
'list_syntax' => ['syntax' => "short"],
|
||||||
'magic_constant_casing' => true,
|
'magic_constant_casing' => true,
|
||||||
'magic_method_casing' => true,
|
'magic_method_casing' => true,
|
||||||
'modernize_types_casting' => true,
|
'modernize_types_casting' => true,
|
||||||
'native_function_casing' => true,
|
'native_function_casing' => true,
|
||||||
'native_function_type_declaration_casing' => true,
|
'native_function_type_declaration_casing' => true,
|
||||||
'new_with_braces' => false, // no option to specify absence of braces
|
|
||||||
'no_alternative_syntax' => true,
|
|
||||||
'no_binary_string' => true,
|
'no_binary_string' => true,
|
||||||
'no_blank_lines_after_phpdoc' => true,
|
'no_blank_lines_after_phpdoc' => true,
|
||||||
'no_empty_comment' => true,
|
'no_empty_comment' => true,
|
||||||
'no_empty_phpdoc' => true,
|
'no_empty_phpdoc' => true,
|
||||||
'no_empty_statement' => true,
|
|
||||||
'no_extra_blank_lines' => true, // this could probably use more configuration
|
'no_extra_blank_lines' => true, // this could probably use more configuration
|
||||||
'no_mixed_echo_print' => ['use' => "echo"],
|
'no_mixed_echo_print' => ['use' => "echo"],
|
||||||
'no_short_bool_cast' => true,
|
'no_short_bool_cast' => true,
|
||||||
|
@ -47,11 +43,9 @@ $rules = [
|
||||||
'no_unneeded_curly_braces' => true,
|
'no_unneeded_curly_braces' => true,
|
||||||
'no_unused_imports' => true,
|
'no_unused_imports' => true,
|
||||||
'no_whitespace_before_comma_in_array' => true,
|
'no_whitespace_before_comma_in_array' => true,
|
||||||
'no_whitespace_in_blank_line' => true,
|
|
||||||
'normalize_index_brace' => true,
|
'normalize_index_brace' => true,
|
||||||
'object_operator_without_whitespace' => true,
|
'object_operator_without_whitespace' => true,
|
||||||
'pow_to_exponentiation' => true,
|
'pow_to_exponentiation' => true,
|
||||||
'return_type_declaration' => ['space_before' => "none"],
|
|
||||||
'set_type_to_cast' => true,
|
'set_type_to_cast' => true,
|
||||||
'standardize_not_equals' => true,
|
'standardize_not_equals' => true,
|
||||||
'trailing_comma_in_multiline_array' => true,
|
'trailing_comma_in_multiline_array' => true,
|
||||||
|
@ -60,17 +54,25 @@ $rules = [
|
||||||
// PSR standard to apply
|
// PSR standard to apply
|
||||||
'@PSR2' => true,
|
'@PSR2' => true,
|
||||||
// PSR-12 rules; php-cs-fixer does not yet support PSR-12 natively
|
// PSR-12 rules; php-cs-fixer does not yet support PSR-12 natively
|
||||||
|
'compact_nullable_typehint' => true,
|
||||||
'declare_equal_normalize' => ['space' => "none"],
|
'declare_equal_normalize' => ['space' => "none"],
|
||||||
|
'function_typehint_space' => true,
|
||||||
'lowercase_cast' => true,
|
'lowercase_cast' => true,
|
||||||
'lowercase_static_reference' => true,
|
'lowercase_static_reference' => true,
|
||||||
|
'no_alternative_syntax' => true,
|
||||||
|
'no_empty_statement' => true,
|
||||||
'no_leading_import_slash' => true,
|
'no_leading_import_slash' => true,
|
||||||
'no_leading_namespace_whitespace' => true,
|
'no_leading_namespace_whitespace' => true,
|
||||||
|
'no_whitespace_in_blank_line' => true,
|
||||||
|
'return_type_declaration' => ['space_before' => "none"],
|
||||||
|
'single_trait_insert_per_statement' => true,
|
||||||
'short_scalar_cast' => true,
|
'short_scalar_cast' => true,
|
||||||
'visibility_required' => ['elements' => ["const", "property", "method"]],
|
'visibility_required' => ['elements' => ["const", "property", "method"]],
|
||||||
// house exceptions to PSR rules
|
// house exceptions to PSR rules
|
||||||
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
|
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
|
||||||
'function_declaration' => ['closure_function_spacing' => "none"],
|
'function_declaration' => ['closure_function_spacing' => "none"],
|
||||||
];
|
'new_with_braces' => false, // no option to specify absence of braces
|
||||||
|
];
|
||||||
|
|
||||||
$finder = \PhpCsFixer\Finder::create();
|
$finder = \PhpCsFixer\Finder::create();
|
||||||
foreach ($paths as $path) {
|
foreach ($paths as $path) {
|
||||||
|
|
Loading…
Reference in a new issue