-
Notifications
You must be signed in to change notification settings - Fork 121
/
.php-cs-fixer.dist.php
63 lines (59 loc) · 1.85 KB
/
.php-cs-fixer.dist.php
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
<?php
use PhpCsFixer\Finder;
/**
* Plugin PHP code fixer.
*/
$finder = Finder::create()
->in([
'src',
'tests'
])
->exclude([
'bin',
'node_modules'
]);
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'strict_param' => false,
'array_syntax' => [
'syntax' => 'short'
],
'cast_spaces' => [
'space' => 'single'
],
'concat_space' => [
'spacing' => 'one'
],
'ordered_imports' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'blank_line_before_statement' => true,
'no_whitespace_in_blank_line' => true,
'blank_line_after_namespace' => true,
'single_blank_line_before_namespace' => true,
'single_line_after_imports' => true,
'blank_line_after_opening_tag' => true,
'no_empty_statement' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'phpdoc_trim' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_order' => true,
'phpdoc_return_self_reference' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'not_operator_with_successor_space' => true,
'return_type_declaration' => [
'space_before' => 'none'
],
'semicolon_after_instruction' => true,
'trim_array_spaces' => true,
'ternary_operator_spaces' => true
])
->setFinder($finder);