Skip to content

Commit

Permalink
Merge pull request #91 from TheDragonCode/2.x
Browse files Browse the repository at this point in the history
Improved rules
  • Loading branch information
andrey-helldar committed Aug 26, 2022
2 parents 2798178 + 7841a31 commit 9671b7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion rules/main.php
Expand Up @@ -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,

Expand Down
3 changes: 1 addition & 2 deletions src/Processors/CodeStyler.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9671b7b

Please sign in to comment.