-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
executable file
·68 lines (66 loc) · 2.58 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
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('data')
->exclude('tests/_support/_generated')
->in(__DIR__)
->name('*.phtml')
;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'@DoctrineAnnotation' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
'single_quote' => true,
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'single_blank_line_before_namespace' => true,
'no_unused_imports' => true,
'no_leading_import_slash' => true,
'php_unit_fqcn_annotation' => true,
'ternary_operator_spaces' => true,
'no_whitespace_in_blank_line' => true,
'whitespace_after_comma_in_array' => true,
'trim_array_spaces' => true,
'space_after_semicolon' => ['remove_in_empty_for_expressions' => true],
'single_line_after_imports' => true,
'return_type_declaration' => true,
'object_operator_without_whitespace' => true,
'no_spaces_around_offset' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_leading_namespace_whitespace' => true,
'multiline_whitespace_before_semicolons' => true,
'include' => true,
'function_typehint_space' => true,
'function_declaration' => ['closure_function_spacing' => 'one'],
'declare_equal_normalize' => true,
'concat_space' => ['spacing' => 'one'],
'compact_nullable_typehint' => true,
'class_definition' => [
'multi_line_extends_each_single_line' => false,
'single_item_single_line' => true,
'single_line' => true
],
'cast_spaces' => ['space' => 'none'],
'binary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => false,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_comma_in_list_call' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'lowercase_cast' => true,
'new_with_braces' => true,
'method_chaining_indentation' => true,
'magic_method_casing' => true,
'class_attributes_separation' => ['elements' => ['method']],
'no_extra_blank_lines' => true
])
->setLineEnding(PHP_EOL)
->setFinder($finder)
;