Skip to content

Commit 9843f79

Browse files
committed
Update cs rules
1 parent e20d096 commit 9843f79

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.cs.php

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@
99
[
1010
'@PSR1' => true,
1111
'@PSR2' => true,
12-
'@Symfony' => true,
13-
'psr_autoloading' => true,
1412
// custom rules
13+
'psr_autoloading' => true,
1514
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'], // psr-5
1615
'phpdoc_to_comment' => false,
1716
'no_superfluous_phpdoc_tags' => false,
1817
'array_indentation' => true,
1918
'array_syntax' => ['syntax' => 'short'],
2019
'cast_spaces' => ['space' => 'none'],
2120
'concat_space' => ['spacing' => 'one'],
22-
'compact_nullable_typehint' => true,
21+
'compact_nullable_type_declaration' => true,
2322
'declare_equal_normalize' => ['space' => 'single'],
2423
'general_phpdoc_annotation_remove' => [
2524
'annotations' => [
@@ -36,7 +35,11 @@
3635
'phpdoc_order' => true, // psr-5
3736
'phpdoc_no_useless_inheritdoc' => false,
3837
'protected_to_private' => false,
39-
'yoda_style' => false,
38+
'yoda_style' => [
39+
'equal' => false,
40+
'identical' => false,
41+
'less_and_greater' => false
42+
],
4043
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
4144
'ordered_imports' => [
4245
'sort_algorithm' => 'alpha',
@@ -47,6 +50,7 @@
4750
'blank_line_between_import_groups' => true,
4851
'fully_qualified_strict_types' => true,
4952
'no_null_property_initialization' => false,
53+
'nullable_type_declaration_for_default_null_value' => false,
5054
'operator_linebreak' => [
5155
'only_booleans' => true,
5256
'position' => 'beginning',
@@ -55,6 +59,16 @@
5559
'import_classes' => true,
5660
'import_constants' => null,
5761
'import_functions' => null
62+
],
63+
'class_definition' => [
64+
'space_before_parenthesis' => true,
65+
],
66+
'trailing_comma_in_multiline' => [
67+
'after_heredoc' => true,
68+
'elements' => ['array_destructuring', 'arrays', 'match']
69+
],
70+
'function_declaration' => [
71+
'closure_fn_spacing' => 'none',
5872
]
5973
]
6074
)

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ indent_style = tab
1919
indent_size = 4
2020

2121
[*.yml]
22-
indent_size = 4
22+
indent_size = 2

0 commit comments

Comments
 (0)