forked from greeflas/default-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php_cs.dist
More file actions
69 lines (64 loc) · 1.85 KB
/
Copy path.php_cs.dist
File metadata and controls
69 lines (64 loc) · 1.85 KB
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
64
65
66
67
68
69
<?php
$header = <<<HEADER
This file is part of the "default-project" package.
(c) Vladimir Kuprienko <vldmr.kuprienko@gmail.com>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
HEADER;
$finder = \PhpCsFixer\Finder::create()
->in([
'src',
'tests',
'bin',
])
->name([
'*.php',
'console',
])
;
return \PhpCsFixer\Config::create()
->setCacheFile(__DIR__ . '/.php_cs.cache')
->setFinder($finder)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
'header_comment' => [
'header' => $header,
'commentType' => 'comment',
'separate' => 'both',
],
'list_syntax' => ['syntax' => 'short'],
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'compact_nullable_typehint' => true,
'logical_operators' => true,
'no_null_property_initialization' => true,
'no_php4_constructor' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'php_unit_test_case_static_method_calls' => true,
'combine_consecutive_issets' => true,
'native_function_invocation' => ['strict' => true],
'blank_line_before_statement' => ['statements' => [
'break',
'continue',
'declare',
'return',
'throw',
'try',
'for',
'foreach',
'while',
'do',
'if',
'switch',
]],
])
;