Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved rules #91

Merged
merged 1 commit into from Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/Processors/BaseProcessor.php
Expand Up @@ -11,7 +11,7 @@
abstract class BaseProcessor implements Processor
{
public function __construct(
protected InputInterface $input,
protected InputInterface $input,
protected OutputInterface $output
) {
}
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