-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
41 lines (38 loc) · 1.3 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
<?php declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->ignoreVCSIgnored(true)
->path('src/')
->path('tests/')
->path('public_html/index.php')
->path('rector.php')
->path('php-cs-fixer.php')
->in(__DIR__);
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@PHP71Migration' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'modernize_types_casting' => false,
// one should use PHPUnit methods to set up expected exception instead of annotations
'heredoc_to_nowdoc' => true,
'no_extra_blank_lines' => true,
'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,
])
->setFinder($finder);