-
Notifications
You must be signed in to change notification settings - Fork 10
/
.php_cs.php
36 lines (34 loc) · 1.21 KB
/
.php_cs.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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in('src')
->exclude('vendor')
->exclude(['Resources']);
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'single_quote' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'method_separation' => true,
'no_blank_lines_after_phpdoc' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'phpdoc_align' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'pre_increment' => true,
'short_scalar_cast' => true,
'space_after_semicolon' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'semicolon_after_instruction' => true,
'trim_array_spaces' => true,
'whitespace_after_comma_in_array' => true,
'phpdoc_add_missing_param_annotation' => true,
'ordered_imports' => true,
'binary_operator_spaces' => ['align_equals' => false, 'align_double_arrow' => true],
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder);