-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php_cs.dist
78 lines (73 loc) · 3.11 KB
/
.php_cs.dist
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
<?php
$finder = \PhpCsFixer\Finder::create()->in('src')->in('test');
return \PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP71Migration' => true,
'@DoctrineAnnotation' => true,
// @Symfony code styles rules blacklisting:
'method_chaining_indentation' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_trailing_comma_in_list_call' => false,
'php_unit_fqcn_annotation' => false,
'phpdoc_align' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_indent' => false,
'phpdoc_inline_tag' => false,
'phpdoc_no_access' => false,
'phpdoc_no_alias_tag' => false,
'phpdoc_no_empty_return' => false,
'phpdoc_no_package' => false,
'phpdoc_no_useless_inheritdoc' => false,
'phpdoc_return_self_reference' => false,
'phpdoc_scalar' => false,
'phpdoc_separation' => false,
'phpdoc_single_line_var_spacing' => false,
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'phpdoc_trim' => false,
'phpdoc_types' => false,
'phpdoc_var_without_name' => false,
'silenced_deprecation_error' => false,
'standardize_not_equals' => false,
// @Symfony customised rules
'class_attributes_separation' => ['elements' => ['method', 'property']],
'concat_space' => ['spacing' => 'one'],
'single_quote' => ['strings_containing_single_quote_chars' => true],
'visibility_required' => ['elements' => ['property', 'method', 'const']],
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'native_function_invocation' => false,
// Additional code style rules whitelisting:
'align_multiline_comment' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'declare_strict_types' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'fully_qualified_strict_types' => true,
'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' => ['strategy' => 'new_line_for_chained_calls'],
'no_alternative_syntax' => true,
'no_superfluous_elseif' => true,
'ordered_imports' => true,
'PedroTroller/single_line_comment' => ['action' => 'collapsed'],
'PedroTroller/forbidden_functions' => [
'comment' => 'TO BE DELETED',
'functions' => ['die', 'dump', 'exec', 'var_dump', 'var_export'],
],
'PedroTroller/line_break_between_method_arguments' => [
'max-length' => 120,
'max-args' => 3,
],
])
->setRiskyAllowed(true)
->setFinder($finder)
->setUsingCache(true)
->registerCustomFixers(new PedroTroller\CS\Fixer\Fixers())
;