|
7 | 7 | ->setRiskyAllowed(true)
|
8 | 8 | ->setRules(
|
9 | 9 | [
|
10 |
| - '@PER-CS2.0' => true, |
| 10 | + '@PSR1' => true, |
| 11 | + '@PSR2' => true, |
11 | 12 | // 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'], |
12 | 19 | '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 | + ], |
13 | 66 | 'trailing_comma_in_multiline' => [
|
14 | 67 | 'after_heredoc' => true,
|
15 | 68 | 'elements' => ['array_destructuring', 'arrays', 'match']
|
| 69 | + ], |
| 70 | + 'function_declaration' => [ |
| 71 | + 'closure_fn_spacing' => 'none', |
16 | 72 | ]
|
17 | 73 | ]
|
18 | 74 | )
|
|
0 commit comments