-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs
39 lines (37 loc) · 1.48 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
<?php
$finder = PhpCsFixer\Finder::create()
->exclude(['bootstrap', 'node_modules', 'storage', 'vendor'])
->notPath('server.php')
->notPath('public/index.php')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'],
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'declare_equal_normalize' => ['space' => 'single'],
'linebreak_after_opening_tag' => true,
'method_chaining_indentation' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_leading_namespace_whitespace' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'phpdoc_indent' => true,
'phpdoc_order' => true,
'single_blank_line_before_namespace' => true,
'ternary_operator_spaces' => true,
'trim_array_spaces' => true,
'whitespace_after_comma_in_array' => true
])
->setFinder($finder);