diff --git a/.editorconfig b/.editorconfig index de516c0..2ccb690 100644 --- a/.editorconfig +++ b/.editorconfig @@ -595,7 +595,7 @@ ij_php_keep_line_breaks = true ij_php_keep_rparen_and_lbrace_on_one_line = true ij_php_keep_simple_classes_in_one_line = true ij_php_keep_simple_methods_in_one_line = false -ij_php_lambda_brace_style = next_line +ij_php_lambda_brace_style = end_of_line ij_php_license_weight = 5 ij_php_line_comment_add_space = false ij_php_line_comment_at_first_column = false diff --git a/rules/main.php b/rules/main.php index d96e8fa..5a45812 100644 --- a/rules/main.php +++ b/rules/main.php @@ -42,11 +42,16 @@ 'braces' => [ 'allow_single_line_anonymous_class_with_empty_body' => false, 'allow_single_line_closure' => true, - 'position_after_anonymous_constructs' => 'next', 'position_after_functions_and_oop_constructs' => 'next', 'position_after_control_structures' => 'same', ], + 'curly_braces_position' => [ + 'classes_opening_brace' => 'next_line_unless_newline_at_signature_end', + 'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end', + 'anonymous_functions_opening_brace' => 'same_line', + ], + 'class_reference_name_casing' => true, 'integer_literal_case' => true, diff --git a/src/Processors/CodeStyler.php b/src/Processors/CodeStyler.php index 503bd69..d120c83 100644 --- a/src/Processors/CodeStyler.php +++ b/src/Processors/CodeStyler.php @@ -39,8 +39,7 @@ protected function getArgv(): ArgvInput protected function resolveOptions(): array { return Arr::of($this->getOptions()) - ->map(function ($value, string $key) - { + ->map(function ($value, string $key) { if (is_bool($value)) { return $key; }