Skip to content

Commit 01bfe09

Browse files
committed
Update cs rules
1 parent 5183512 commit 01bfe09

3 files changed

Lines changed: 40 additions & 5 deletions

File tree

.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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
end_of_line = lf
7+
8+
[composer.json]
9+
indent_size = 4
10+
11+
[*.js]
12+
indent_size = 4
13+
14+
[*.neon]
15+
indent_size = 4
16+
indent_style = tab
17+
18+
[*.xml]
19+
indent_size = 4
20+
21+
[*.yml]
22+
indent_size = 2

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
/.gitattributes export-ignore
2121
/.gitignore export-ignore
2222
/.travis.* export-ignore
23-
/.scrutinizer.* export-ignore
2423
/.editorconfig export-ignore
2524
/.coveralls.* export-ignore
2625

0 commit comments

Comments
 (0)