Skip to content

Commit b60dd7c

Browse files
committed
Update cs rules to PER-CS2.0
1 parent d018b5f commit b60dd7c

File tree

1 file changed

+5
-51
lines changed

1 file changed

+5
-51
lines changed

.cs.php

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

0 commit comments

Comments
 (0)