-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
61 lines (57 loc) · 1.51 KB
/
.php-cs-fixer.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
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()
->exclude('tests/Fixtures')
->in(__DIR__);
$config = new Config();
$config
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'single_quote' => true,
'array_indentation' => true,
'trailing_comma_in_multiline' => true,
'method_chaining_indentation' => true,
'binary_operator_spaces' => true,
'strict_comparison' => true,
'standardize_not_equals' => true,
'strict_param' => true,
'concat_space' => [
'spacing' => 'one',
],
'array_syntax' => [
'syntax' => 'short',
],
'no_unused_imports' => true,
'no_useless_else' => true,
'blank_line_before_statement' => [
'statements' => [
'break',
'continue',
'declare',
'for',
'foreach',
'if',
'return',
'throw',
'try',
'while',
],
],
'whitespace_after_comma_in_array' => true,
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
'return_type_declaration' => [
'space_before' => 'none',
],
'cast_spaces' => true,
])
->setFinder($finder);
return $config;