-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.php-cs-fixer.php
43 lines (40 loc) · 1.39 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
<?php declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->path('src/core/')
->path('public_html/index.php')
->path('src/config/app.php.dist')
->path('tests/')
->path('rector.php')
->path('.php-cs-fixer.php')
->path('bin/console.php')
->in(__DIR__);
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PHP71Migration' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'heredoc_to_nowdoc' => true,
'no_extra_blank_lines' => [
'tokens' => [
'break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'
],
],
'echo_tag_syntax' => ['format' => 'long'],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_strict' => true,
'return_type_declaration' => true,
'simplified_null_return' => false,
'void_return' => true,
'phpdoc_order' => true,
'semicolon_after_instruction' => true,
'strict_comparison' => true,
'strict_param' => true,
'phpdoc_align' => false,
'declare_strict_types' => true,
])
->setRiskyAllowed(true)
->setFinder($finder);