-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php_cs
65 lines (62 loc) · 2.69 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
<?php
$rules = [
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'no_multiline_whitespace_before_semicolons' => true,
'no_short_echo_tag' => true,
'no_unused_imports' => true,
'no_empty_comment' => true,
'not_operator_with_successor_space' => true,
'no_useless_else' => true,
'ordered_imports' => [
'sortAlgorithm' => 'length',
],
'no_whitespace_before_comma_in_array' => true,
// commenting/docblock rules
'align_multiline_comment' => [
'comment_type' => 'all_multiline'
],
'general_phpdoc_annotation_remove' => [
'license', 'copyright', 'category', 'version'
],
'multiline_comment_opening_closing' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'no_trailing_whitespace_in_comment' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_no_package' => true,
'single_quote' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'no_trailing_comma_in_singleline_array' => false,
'single_import_per_statement' => false,
//'header_comment' => [ // for file-level comment deletion
// 'header' => '',
//],
'binary_operator_spaces' => [
'operators' => [
'=' => 'single_space',
]
],
];
return PhpCsFixer\Config::create()
->setRules($rules)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/app')
->in(__DIR__ . '/database/seeds')
->in(__DIR__ . '/database/factories')
->in(__DIR__ . '/database/migrations')
->in(__DIR__ . '/config')
->in(__DIR__ . '/routes')
);