-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.php_cs.dist
49 lines (46 loc) · 1.34 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
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('resources/views')
->exclude('storage')
->exclude('node_modules')
->exclude('bootstrap/cache')
->notPath('_ide_helper.php')
->notPath('_ide_helper_models.php')
->notPath('.phpstorm.meta.php')
->in(__DIR__)
;
$rules = [
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'align_double_arrow' => true,
],
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
'no_unused_imports' => true,
'phpdoc_align' => [
'align' => 'left',
],
'concat_space' => [
'spacing' => 'none',
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
],
'array_indentation' => true,
'no_trailing_comma_in_singleline_array' => true,
'trailing_comma_in_multiline_array' => true,
'whitespace_after_comma_in_array' => true,
'blank_line_after_namespace' => true,
'blank_line_before_statement' => true,
'braces' => [
'position_after_functions_and_oop_constructs' => 'next',
],
'cast_spaces' => [
'space' => 'single',
],
];
return PhpCsFixer\Config::create()
->setRules($rules)
->setFinder($finder);