-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php_cs
45 lines (43 loc) · 1.39 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
<?php
$finder = PhpCsFixer\Finder::create()
->exclude([])
->notPath([])
->in(['_lib/', 'test']);
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
// 'psr4' => true,
'no_leading_import_slash' => true,
'fully_qualified_strict_types' => true,
'no_unused_imports' => true,
'ordered_imports'=> [
'imports_order' => null,
'sort_algorithm' => 'alpha'
],
'array_syntax' => ['syntax' => 'short'],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_indent' => true,
'phpdoc_types' => true,
'phpdoc_order' => true,
'phpdoc_trim' => true,
'single_line_after_imports' => true,
'trailing_comma_in_multiline_array' => true,
'no_blank_lines_after_phpdoc' => true,
'return_type_declaration' => true,
// 'logical_operators' => true,
'concat_space' => ['spacing' => 'one'],
'cast_spaces' => true,
'no_blank_lines_after_class_opening' => true,
'no_empty_statement' => true,
'no_useless_else' => true,
'single_quote' => true,
'yoda_style' => true,
'unary_operator_spaces' => true,
'lowercase_cast' => true,
'binary_operator_spaces' => [
'operators' => [
'=' => 'single_space',
]
],
])
->setFinder($finder);