forked from fl0v/yii2-rollbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs
78 lines (75 loc) · 2.71 KB
/
.php_cs
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(__DIR__.DIRECTORY_SEPARATOR.'src')
;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@PSR1' => true,
'@PSR2' => true,
// custom
'array_indentation' => true,
'binary_operator_spaces' => [
'default' => 'align_single_space_minimal',
'operators' => [
'|' => 'no_space'
],
],
'blank_line_before_statement' => false,
'braces' => [
'allow_single_line_closure' => true,
],
'function_typehint_space' => true,
'increment_style' => false,
'method_chaining_indentation' => true,
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'new_line_for_chained_calls',
],
'no_extra_blank_lines' => [
'tokens' => [
'switch',
'break',
'continue',
'return',
'throw',
'use',
'use_trait',
'parenthesis_brace_block',
'square_brace_block',
],
],
'no_null_property_initialization' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'non_printable_character' => true,
'not_operator_with_successor_space' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
//'property_private',
'construct',
'destruct',
'magic',
],
],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types_order' => true,
'phpdoc_separation' => false,
'phpdoc_summary' => false,
'self_accessor' => true,
'semicolon_after_instruction' => false,
'unary_operator_spaces' => false,
'yoda_style' => false,
])
->setFinder($finder)
;