-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php-cs-fixer.dist.php
90 lines (87 loc) · 2.85 KB
/
.php-cs-fixer.dist.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
88
89
90
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('bin')
->exclude('config')
->exclude('var')
->exclude('vendor')
;
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short',
],
'trailing_comma_in_multiline' => [
'elements' => ['arrays', 'arguments', 'parameters'],
],
'dir_constant' => true,
'ereg_to_preg' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'fopen_flag_order' => true,
'single_line_comment_style' => [
'comment_types' => ['hash'],
],
'heredoc_indentation' => true,
'heredoc_to_nowdoc' => true,
'implode_call' => true,
'is_null' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => [
'syntax' => 'short',
],
'logical_operators' => true,
'method_chaining_indentation' => true,
'modernize_types_casting' => true,
'multiline_whitespace_before_semicolons' => true,
'no_alias_functions' => true,
'no_alternative_syntax' => true,
'no_null_property_initialization' => true,
'no_php4_constructor' => true,
'echo_tag_syntax' => [
'format' => 'long',
],
'no_superfluous_elseif' => true,
'no_unneeded_final_method' => true,
'no_unreachable_default_argument_value' => true,
'no_unset_cast' => true,
'no_unset_on_property' => true,
'no_useless_else' => true,
'ordered_class_elements' => true,
'ordered_interfaces' => true,
'php_unit_expectation' => true,
'php_unit_method_casing' => [
'case' => 'snake_case',
],
'php_unit_mock_short_will_return' => true,
'php_unit_namespaced' => true,
'php_unit_no_expectation_annotation' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
'php_unit_test_annotation' => [
'style' => 'annotation',
],
'php_unit_test_case_static_method_calls' => [
'call_type' => 'self',
],
'pow_to_exponentiation' => true,
'protected_to_private' => true,
'psr_autoloading' => true,
'self_accessor' => true,
'set_type_to_cast' => true,
'simple_to_complex_string_variable' => true,
'static_lambda' => true,
'strict_comparison' => true,
'strict_param' => true,
'ternary_to_null_coalescing' => true,
'visibility_required' => [
'elements' => ['property', 'const'],
],
'void_return' => true,
'declare_strict_types' => true,
])
->setUsingCache(true)
->setFinder($finder)
;