-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php_cs.php
87 lines (85 loc) · 3.29 KB
/
.php_cs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
use Symfony\Component\Finder\Finder;
return (new PhpCsFixer\Config())
->setFinder(
Finder::create()
->in([
getcwd().'/src',
getcwd().'/tests',
])
->exclude([
'migrations/*',
])
)
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@Symfony' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'blank_line_after_opening_tag' => true,
'class_attributes_separation' => ['elements' =>['property' => 'only_if_meta', 'const' => 'only_if_meta']],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'comment_to_phpdoc' => true,
'date_time_immutable' => true,
'declare_strict_types' => true,
'doctrine_annotation_array_assignment' => true,
'doctrine_annotation_braces' => true,
'doctrine_annotation_indentation' => true,
'doctrine_annotation_spaces' => true,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'final_internal_class' => false,
'general_phpdoc_annotation_remove' => false,
'header_comment' => false,
'heredoc_to_nowdoc' => false,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => true,
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => true,
'native_function_invocation' => false,
'no_alias_functions' => true,
'no_blank_lines_before_namespace' => false,
'no_extra_blank_lines' => true,
'no_null_property_initialization' => true,
'no_php4_constructor' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'ordered_class_elements' => false,
'php_unit_dedicate_assert' => false,
'php_unit_expectation' => false,
'php_unit_method_casing' => ['case' =>'snake_case'],
'php_unit_mock' => false,
'php_unit_namespaced' => false,
'php_unit_no_expectation_annotation' => false,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => false,
'php_unit_test_annotation' => false,
'php_unit_test_class_requires_covers' => false,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_order_by_value' => true,
'phpdoc_to_return_type' => true,
'phpdoc_types_order' => false,
'pow_to_exponentiation' => true,
'psr_autoloading' => true,
'random_api_migration' => false,
'simplified_null_return' => false,
'single_line_throw' => false,
'static_lambda' => false,
'strict_comparison' => true,
'strict_param' => true,
'string_line_ending' => true,
'ternary_to_null_coalescing' => true,
'void_return' => true,
])
;