-
Notifications
You must be signed in to change notification settings - Fork 23
/
.php-cs-fixer.dist.php
61 lines (55 loc) · 1.68 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
<?php
$header = <<<HEADER
This file is part of the BoShurikTelegramBotBundle.
(c) Alexander Borisov <[email protected]>
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',
])
->name('*.php')
;
return (new PhpCsFixer\Config())
->setFinder($finder)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
'list_syntax' => ['syntax' => 'short'],
'array_syntax' => ['syntax' => 'short'],
'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,
'combine_consecutive_issets' => true,
'blank_line_before_statement' => ['statements' => [
'break',
'continue',
'return',
'throw',
]],
'header_comment' => [
'header' => $header,
'comment_type' => 'comment',
'separate' => 'both',
],
'phpdoc_summary' => false,
'yoda_style' => false,
'declare_strict_types' => false,
'void_return' => false,
'phpdoc_align' => [],
'phpdoc_to_comment' => false,
'single_line_comment_spacing' => false,
])
;