-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php-cs-fixer.php
39 lines (36 loc) · 1.1 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.DIRECTORY_SEPARATOR.'src')
->in(__DIR__.DIRECTORY_SEPARATOR.'tests')
;
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@PHP74Migration' => true,
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => [
'imports_order' => null,
'sort_algorithm' => 'alpha',
],
'phpdoc_order' => true,
'single_line_throw' => false,
'yoda_style' => [
'equal' => null,
'identical' => null,
'less_and_greater' => null,
'always_move_variable' => false,
],
// risky -->
'native_function_invocation' => ['include' => ['@all']],
])
->setFinder($finder)
;