Skip to content

Commit f06e0e5

Browse files
committed
CS
1 parent 9952929 commit f06e0e5

File tree

4 files changed

+106
-27
lines changed

4 files changed

+106
-27
lines changed

.editorconfig

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ trim_trailing_whitespace = true
1010
ij_continuation_indent_size = 8
1111
ij_formatter_off_tag = @formatter:off
1212
ij_formatter_on_tag = @formatter:on
13-
ij_formatter_tags_enabled = false
13+
ij_formatter_tags_enabled = true
1414
ij_smart_tabs = false
15-
ij_visual_guides = none
15+
ij_visual_guides =
1616
ij_wrap_on_typing = false
1717

1818
[*.blade.php]
@@ -105,6 +105,12 @@ ij_scss_space_before_opening_brace = true
105105
ij_scss_use_double_quotes = true
106106
ij_scss_value_alignment = 0
107107

108+
[*.twig]
109+
ij_twig_keep_indents_on_empty_lines = false
110+
ij_twig_spaces_inside_comments_delimiters = true
111+
ij_twig_spaces_inside_delimiters = true
112+
ij_twig_spaces_inside_variable_delimiters = true
113+
108114
[*.vue]
109115
ij_continuation_indent_size = 4
110116
ij_visual_guides = 175
@@ -223,6 +229,7 @@ ij_typescript_method_parameters_new_line_after_left_paren = false
223229
ij_typescript_method_parameters_right_paren_on_new_line = false
224230
ij_typescript_method_parameters_wrap = off
225231
ij_typescript_object_literal_wrap = on_every_item
232+
ij_typescript_object_types_wrap = on_every_item
226233
ij_typescript_parentheses_expression_new_line_after_left_paren = false
227234
ij_typescript_parentheses_expression_right_paren_on_new_line = false
228235
ij_typescript_place_assignment_sign_on_next_line = false
@@ -231,6 +238,7 @@ ij_typescript_prefer_explicit_types_function_expression_returns = false
231238
ij_typescript_prefer_explicit_types_function_returns = false
232239
ij_typescript_prefer_explicit_types_vars_fields = false
233240
ij_typescript_prefer_parameters_wrap = false
241+
ij_typescript_property_prefix =
234242
ij_typescript_reformat_c_style_comments = false
235243
ij_typescript_space_after_colon = true
236244
ij_typescript_space_after_comma = true
@@ -401,6 +409,7 @@ ij_javascript_method_parameters_new_line_after_left_paren = false
401409
ij_javascript_method_parameters_right_paren_on_new_line = false
402410
ij_javascript_method_parameters_wrap = off
403411
ij_javascript_object_literal_wrap = on_every_item
412+
ij_javascript_object_types_wrap = on_every_item
404413
ij_javascript_parentheses_expression_new_line_after_left_paren = false
405414
ij_javascript_parentheses_expression_right_paren_on_new_line = false
406415
ij_javascript_place_assignment_sign_on_next_line = false
@@ -409,6 +418,7 @@ ij_javascript_prefer_explicit_types_function_expression_returns = false
409418
ij_javascript_prefer_explicit_types_function_returns = false
410419
ij_javascript_prefer_explicit_types_vars_fields = false
411420
ij_javascript_prefer_parameters_wrap = false
421+
ij_javascript_property_prefix =
412422
ij_javascript_reformat_c_style_comments = false
413423
ij_javascript_space_after_colon = true
414424
ij_javascript_space_after_comma = true
@@ -498,6 +508,7 @@ ij_continuation_indent_size = 4
498508
ij_smart_tabs = true
499509
ij_php_align_assignments = true
500510
ij_php_align_class_constants = true
511+
ij_php_align_enum_cases = true
501512
ij_php_align_group_field_declarations = true
502513
ij_php_align_inline_comments = true
503514
ij_php_align_key_value_pairs = true
@@ -530,6 +541,7 @@ ij_php_blank_lines_after_opening_tag = 0
530541
ij_php_blank_lines_after_package = 1
531542
ij_php_blank_lines_around_class = 1
532543
ij_php_blank_lines_around_constants = 0
544+
ij_php_blank_lines_around_enum_cases = 0
533545
ij_php_blank_lines_around_field = 0
534546
ij_php_blank_lines_around_method = 0
535547
ij_php_blank_lines_before_class_end = 0
@@ -545,7 +557,11 @@ ij_php_call_parameters_wrap = normal
545557
ij_php_catch_on_new_line = false
546558
ij_php_category_weight = 28
547559
ij_php_class_brace_style = next_line
560+
ij_php_comma_after_last_argument = true
548561
ij_php_comma_after_last_array_element = true
562+
ij_php_comma_after_last_closure_use_var = true
563+
ij_php_comma_after_last_match_arm = true
564+
ij_php_comma_after_last_parameter = true
549565
ij_php_concat_spaces = true
550566
ij_php_copyright_weight = 28
551567
ij_php_deprecated_weight = 28
@@ -562,7 +578,7 @@ ij_php_for_brace_force = always
562578
ij_php_for_statement_new_line_after_left_paren = true
563579
ij_php_for_statement_right_paren_on_new_line = true
564580
ij_php_for_statement_wrap = off
565-
ij_php_force_empty_methods_in_one_line = false
581+
ij_php_force_empty_methods_in_one_line = true
566582
ij_php_force_short_declaration_array_style = true
567583
ij_php_getters_setters_naming_style = camel_case
568584
ij_php_getters_setters_order_style = getters_first
@@ -572,7 +588,7 @@ ij_php_if_brace_force = always
572588
ij_php_if_lparen_on_next_line = false
573589
ij_php_if_rparen_on_next_line = false
574590
ij_php_ignore_weight = 28
575-
ij_php_import_sorting = alphabetic
591+
ij_php_import_sorting = by_length
576592
ij_php_indent_break_from_case = true
577593
ij_php_indent_case_from_switch = true
578594
ij_php_indent_code_in_php_tags = false
@@ -704,6 +720,7 @@ ij_php_ternary_operation_signs_on_next_line = false
704720
ij_php_ternary_operation_wrap = off
705721
ij_php_throws_weight = 1
706722
ij_php_todo_weight = 28
723+
ij_php_treat_multiline_arrays_and_lambdas_multiline = false
707724
ij_php_unknown_tag_weight = 28
708725
ij_php_upper_case_boolean_const = false
709726
ij_php_upper_case_null_const = false
@@ -714,13 +731,17 @@ ij_php_version_weight = 28
714731
ij_php_while_brace_force = always
715732
ij_php_while_on_new_line = false
716733

717-
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
734+
[{*.graphqlconfig,*.graphqlrc,*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
735+
ij_json_array_wrapping = split_into_lines
718736
ij_json_keep_blank_lines_in_code = 0
719737
ij_json_keep_indents_on_empty_lines = false
720738
ij_json_keep_line_breaks = true
739+
ij_json_keep_trailing_comma = false
740+
ij_json_object_wrapping = split_into_lines
741+
ij_json_property_alignment = do_not_align
721742
ij_json_space_after_colon = true
722743
ij_json_space_after_comma = true
723-
ij_json_space_before_colon = true
744+
ij_json_space_before_colon = false
724745
ij_json_space_before_comma = false
725746
ij_json_spaces_within_braces = false
726747
ij_json_spaces_within_brackets = false
@@ -737,7 +758,7 @@ ij_html_block_comment_add_space = false
737758
ij_html_block_comment_at_first_column = true
738759
ij_html_do_not_align_children_of_min_lines = 0
739760
ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
740-
ij_html_do_not_indent_children_of_tags = none
761+
ij_html_do_not_indent_children_of_tags =
741762
ij_html_enforce_quotes = true
742763
ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
743764
ij_html_keep_blank_lines = 2
@@ -756,11 +777,20 @@ ij_html_space_around_equality_in_attribute = false
756777
ij_html_space_inside_empty_tag = true
757778
ij_html_text_wrap = normal
758779

780+
[{*.http,*.rest}]
781+
indent_size = 0
782+
ij_continuation_indent_size = 4
783+
ij_http-request_call_parameters_wrap = normal
784+
ij_http-request_method_parameters_wrap = split_into_lines
785+
ij_http-request_space_before_comma = true
786+
ij_http-request_spaces_around_assignment_operators = true
787+
759788
[{*.markdown,*.md}]
760789
ij_markdown_force_one_space_after_blockquote_symbol = true
761790
ij_markdown_force_one_space_after_header_symbol = true
762791
ij_markdown_force_one_space_after_list_bullet = true
763792
ij_markdown_force_one_space_between_words = true
793+
ij_markdown_format_tables = true
764794
ij_markdown_insert_quote_arrows_on_wrap = true
765795
ij_markdown_keep_indents_on_empty_lines = false
766796
ij_markdown_keep_line_breaks_inside_text_blocks = true

.php-cs-fixer.php

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,99 @@
1919
'short_scalar_cast' => true,
2020
'phpdoc_to_comment' => false,
2121
'single_line_throw' => false,
22+
'single_line_empty_body' => true,
2223
'single_blank_line_at_eof' => true,
2324
'no_superfluous_phpdoc_tags' => false,
2425
'linebreak_after_opening_tag' => true,
2526
'class_attributes_separation' => false,
27+
'blank_line_between_import_groups' => false,
2628
'not_operator_with_successor_space' => false,
2729
'single_trait_insert_per_statement' => false,
2830
'nullable_type_declaration_for_default_null_value' => true,
2931

30-
'concat_space' => [
32+
'concat_space' => [
3133
'spacing' => 'one',
3234
],
33-
'binary_operator_spaces' => [
34-
'operators' => [
35-
'|' => null,
36-
'=' => 'align_single_space',
37-
'=>' => 'align_single_space',
38-
],
39-
],
40-
'array_syntax' => [
35+
'array_syntax' => [
4136
'syntax' => 'short',
4237
],
43-
'ordered_imports' => [
38+
'ordered_types' => [
39+
'sort_algorithm' => 'none',
40+
'null_adjustment' => 'always_last',
41+
],
42+
'ordered_imports' => [
43+
'imports_order' => ['class', 'const', 'function'],
4444
'sort_algorithm' => 'length',
4545
],
46-
'cast_spaces' => [
46+
'cast_spaces' => [
4747
'space' => 'none',
4848
],
49-
'align_multiline_comment' => [
49+
'new_with_parentheses' => [
50+
'named_class' => false,
51+
'anonymous_class' => false,
52+
],
53+
'curly_braces_position' => [
54+
'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
55+
],
56+
'align_multiline_comment' => [
5057
'comment_type' => 'phpdocs_like',
5158
],
52-
'phpdoc_align' => [
59+
'global_namespace_import' => [
60+
'import_classes' => null,
61+
'import_constants' => null,
62+
'import_functions' => true,
63+
],
64+
'type_declaration_spaces' => [
65+
'elements' => [],
66+
],
67+
'nullable_type_declaration' => [
68+
'syntax' => 'question_mark',
69+
],
70+
'attribute_empty_parentheses' => [
71+
'use_parentheses' => false,
72+
],
73+
'trailing_comma_in_multiline' => [
74+
'elements' => ['arrays', 'arguments', 'parameters', 'match'],
75+
],
76+
'phpdoc_align' => [
5377
'align' => 'vertical',
78+
'tags' => [
79+
'param',
80+
'property',
81+
'property-read',
82+
'property-write',
83+
'return',
84+
'throws',
85+
'type',
86+
'var',
87+
'method',
88+
],
5489
],
55-
'increment_style' => [
90+
'increment_style' => [
5691
'style' => 'post',
5792
],
58-
'phpdoc_no_alias_tag' => [
93+
'phpdoc_no_alias_tag' => [
5994
'replacements' => [
6095
'type' => 'var',
6196
'link' => 'see',
6297
],
6398
],
64-
'no_extra_blank_lines' => [
99+
'no_extra_blank_lines' => [
65100
'tokens' => [],
66101
],
102+
'function_declaration' => [
103+
'closure_function_spacing' => 'one',
104+
],
105+
'binary_operator_spaces' => [
106+
'operators' => [
107+
'|' => null,
108+
'=' => 'align_single_space',
109+
'=>' => 'align_single_space',
110+
],
111+
],
112+
'fully_qualified_strict_types' => [
113+
'phpdoc_tags' => [],
114+
],
67115
])
68116
->setFinder($finder);
69117

tests/ObservableTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testEventsAreRegistered(): void
2424

2525
$this->assertTrue(
2626
$events->hasListeners($listener = "eloquent.{$event}: " . ObservableModel::class),
27-
"Listener {$listener} is not registered"
27+
"Listener {$listener} is not registered",
2828
);
2929
}
3030
}
@@ -38,7 +38,7 @@ public function testTraitEventsAreRegistered(): void
3838
foreach (ObservableModel::registerTraitWithEventsEvents() as $event) {
3939
$this->assertTrue(
4040
$events->hasListeners($listener = "eloquent.{$event}: " . ObservableModel::class),
41-
"Listener {$listener} is not registered"
41+
"Listener {$listener} is not registered",
4242
);
4343
}
4444
}
@@ -63,7 +63,7 @@ public function testEventWithoutHandlerIsNotRegistered(): void
6363

6464
$this->assertFalse(
6565
$events->hasListeners($listener = 'eloquent.customEventNotRegistered: ' . ObservableModel::class),
66-
"Listener {$listener} is not registered"
66+
"Listener {$listener} is not registered",
6767
);
6868
}
6969
}

tests/migrations/2022_02_26_191938_create_tests_table.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Database\Migrations\Migration;
66

7-
return new class extends Migration {
7+
return new class extends Migration
8+
{
89
public function up(): void
910
{
1011
Schema::create('tests', static function (Blueprint $table) {

0 commit comments

Comments
 (0)