From a332afe3e8dedfc8294a04f9ec3e6d69534061e8 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Tue, 4 Apr 2023 11:41:47 +0200 Subject: [PATCH] Update PHP-CS-Fixer configuration --- .php-cs-fixer.dist.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 3431582..44121ea 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -33,6 +33,7 @@ 'blank_line_before_statement' => [ 'statements' => [ 'break', + 'case', 'continue', 'declare', 'default', @@ -44,6 +45,7 @@ 'if', 'include', 'include_once', + 'phpdoc', 'require', 'require_once', 'return', @@ -52,15 +54,13 @@ 'try', 'while', 'yield', + 'yield_from', ], ], - 'braces' => [ - 'position_after_anonymous_constructs' => 'next', - ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ - 'const' => 'one', + 'const' => 'none', 'method' => 'one', 'property' => 'only_if_meta' ] @@ -73,7 +73,14 @@ 'compact_nullable_typehint' => true, 'concat_space' => ['spacing' => 'one'], 'constant_case' => true, + 'control_structure_braces' => true, + 'control_structure_continuation_position' => true, + 'curly_braces_position' => [ + 'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end', + 'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end', + ], 'declare_equal_normalize' => ['space' => 'none'], + 'declare_parentheses' => true, 'declare_strict_types' => true, 'dir_constant' => true, 'echo_tag_syntax' => true, @@ -147,6 +154,7 @@ 'no_leading_import_slash' => true, 'no_leading_namespace_whitespace' => true, 'no_mixed_echo_print' => ['use' => 'print'], + 'no_multiple_statements_per_line' => true, 'no_multiline_whitespace_around_double_arrow' => true, 'no_null_property_initialization' => true, 'no_php4_constructor' => true, @@ -272,11 +280,12 @@ 'single_import_per_statement' => true, 'single_line_after_imports' => true, 'single_quote' => true, - 'single_space_after_construct' => true, + 'single_space_around_construct' => true, 'single_trait_insert_per_statement' => true, 'space_after_semicolon' => true, 'standardize_increment' => true, 'standardize_not_equals' => true, + 'statement_indentation' => true, 'static_lambda' => true, 'strict_param' => true, 'string_line_ending' => true,