-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php_cs.php
41 lines (39 loc) · 1.24 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
37
38
39
40
41
<?php declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(['src', 'tests']);
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@PSR2' => true,
'no_empty_phpdoc' => true,
'single_blank_line_before_namespace' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'length'],
'no_spaces_after_function_name' => true,
'no_whitespace_in_blank_line' => true,
'no_whitespace_before_comma_in_array' => true,
'no_useless_return' => true,
'no_useless_else' => true,
'no_unused_imports' => true,
'standardize_not_equals' => true,
'declare_strict_types' => true,
'is_null' => true,
'yoda_style' => false,
'no_empty_statement' => true,
'void_return' => true,
'list_syntax' => ['syntax' => 'short'],
'class_attributes_separation' => [
'elements' => [
'const',
'method',
'property',
]
],
'blank_line_before_statement' => [
'statements' => [
'return',
]
],
])
->setRiskyAllowed(true)
->setFinder($finder);