Skip to content

Commit

Permalink
Bump to php-cs-fixer v3.34
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Oct 1, 2023
1 parent 238a1b7 commit 39590d7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"require": {
"php": "^7.4 || ^8.0",
"ext-tokenizer": "*",
"friendsofphp/php-cs-fixer": "^3.30",
"friendsofphp/php-cs-fixer": "^3.34",
"nexusphp/cs-config": "^3.6"
},
"require-dev": {
Expand Down
69 changes: 35 additions & 34 deletions src/CodeIgniter4.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ public function __construct()
'min_line_breaks' => 2,
'max_line_breaks' => 2,
],
'braces_position' => [
'control_structures_opening_brace' => 'same_line',
'functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_classes_opening_brace' => 'same_line',
'allow_single_line_empty_anonymous_classes' => true,
'allow_single_line_anonymous_functions' => true,
],
'cast_spaces' => ['space' => 'single'],
'class_attributes_separation' => [
'elements' => [
Expand Down Expand Up @@ -101,31 +110,22 @@ public function __construct()
'phpstan-ignore-next-line',
],
],
'compact_nullable_typehint' => true,
'compact_nullable_type_declaration' => true,
'concat_space' => ['spacing' => 'one'],
'constant_case' => ['case' => 'lower'],
'control_structure_braces' => true,
'control_structure_continuation_position' => ['position' => 'same_line'],
'curly_braces_position' => [
'control_structures_opening_brace' => 'same_line',
'functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_classes_opening_brace' => 'same_line',
'allow_single_line_empty_anonymous_classes' => true,
'allow_single_line_anonymous_functions' => true,
],
'date_time_create_from_format_call' => true,
'date_time_immutable' => false,
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'declare_strict_types' => false,
'dir_constant' => true,
'doctrine_annotation_array_assignment' => false,
'doctrine_annotation_braces' => false,
'doctrine_annotation_indentation' => false,
'doctrine_annotation_spaces' => false,
'echo_tag_syntax' => [
'date_time_create_from_format_call' => true,
'date_time_immutable' => false,
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'declare_strict_types' => false,
'dir_constant' => true,
'doctrine_annotation_array_assignment' => false,
'doctrine_annotation_braces' => false,
'doctrine_annotation_indentation' => false,
'doctrine_annotation_spaces' => false,
'echo_tag_syntax' => [
'format' => 'short',
'long_function' => 'echo',
'shorten_simple_statements_only' => false,
Expand Down Expand Up @@ -216,20 +216,21 @@ public function __construct()
'magic_method_casing' => true,
'mb_str_functions' => false,
'method_argument_space' => [
'after_heredoc' => false,
'keep_multiple_spaces_after_comma' => false,
'on_multiline' => 'ensure_fully_multiline',
],
'method_chaining_indentation' => true,
'modernize_strpos' => false, // requires 8.0+
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'native_constant_invocation' => false,
'native_function_casing' => true,
'native_function_invocation' => false,
'native_function_type_declaration_casing' => true,
'new_with_braces' => [
'after_heredoc' => false,
'attribute_placement' => 'standalone',
],
'method_chaining_indentation' => true,
'modernize_strpos' => false, // requires 8.0+
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'native_constant_invocation' => false,
'native_function_casing' => true,
'native_function_invocation' => false,
'native_type_declaration_casing' => true,
'new_with_parentheses' => [
'named_class' => true,
'anonymous_class' => true,
],
Expand Down Expand Up @@ -291,6 +292,7 @@ public function __construct()
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => ['namespaces' => true],
'no_unneeded_control_parentheses' => [
'statements' => [
'break',
Expand All @@ -302,7 +304,6 @@ public function __construct()
'yield',
],
],
'no_unneeded_curly_braces' => ['namespaces' => true],
'no_unneeded_final_method' => ['private_methods' => true],
'no_unneeded_import_alias' => true,
'no_unreachable_default_argument_value' => true,
Expand Down

0 comments on commit 39590d7

Please sign in to comment.