Skip to content

Commit 67215b4

Browse files
committed
Update cs rules
1 parent b60dd7c commit 67215b4

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

.cs.php

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,68 @@
77
->setRiskyAllowed(true)
88
->setRules(
99
[
10-
'@PER-CS2.0' => true,
10+
'@PSR1' => true,
11+
'@PSR2' => true,
1112
// custom rules
13+
'psr_autoloading' => true,
14+
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'], // psr-5
15+
'phpdoc_to_comment' => false,
16+
'no_superfluous_phpdoc_tags' => false,
17+
'array_indentation' => true,
18+
'array_syntax' => ['syntax' => 'short'],
1219
'cast_spaces' => ['space' => 'none'],
20+
'concat_space' => ['spacing' => 'one'],
21+
'compact_nullable_type_declaration' => true,
22+
'declare_equal_normalize' => ['space' => 'single'],
23+
'general_phpdoc_annotation_remove' => [
24+
'annotations' => [
25+
'author',
26+
'package',
27+
],
28+
],
29+
'increment_style' => ['style' => 'post'],
30+
'list_syntax' => ['syntax' => 'short'],
31+
'echo_tag_syntax' => ['format' => 'long'],
32+
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
33+
'phpdoc_align' => false,
34+
'phpdoc_no_empty_return' => false,
35+
'phpdoc_order' => true, // psr-5
36+
'phpdoc_no_useless_inheritdoc' => false,
37+
'protected_to_private' => false,
38+
'yoda_style' => [
39+
'equal' => false,
40+
'identical' => false,
41+
'less_and_greater' => false
42+
],
43+
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
44+
'ordered_imports' => [
45+
'sort_algorithm' => 'alpha',
46+
'imports_order' => ['class', 'const', 'function'],
47+
],
48+
'single_line_throw' => false,
49+
'declare_strict_types' => false,
50+
'blank_line_between_import_groups' => true,
51+
'fully_qualified_strict_types' => true,
52+
'no_null_property_initialization' => false,
53+
'nullable_type_declaration_for_default_null_value' => false,
54+
'operator_linebreak' => [
55+
'only_booleans' => true,
56+
'position' => 'beginning',
57+
],
58+
'global_namespace_import' => [
59+
'import_classes' => true,
60+
'import_constants' => null,
61+
'import_functions' => null
62+
],
63+
'class_definition' => [
64+
'space_before_parenthesis' => true,
65+
],
1366
'trailing_comma_in_multiline' => [
1467
'after_heredoc' => true,
1568
'elements' => ['array_destructuring', 'arrays', 'match']
69+
],
70+
'function_declaration' => [
71+
'closure_fn_spacing' => 'none',
1672
]
1773
]
1874
)

0 commit comments

Comments
 (0)