-
Notifications
You must be signed in to change notification settings - Fork 17
/
.php-cs-fixer.php
34 lines (31 loc) · 1.01 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
<?php
use PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer;
$finder = PhpCsFixer\Finder::create()
->exclude('/tests/scratchpad')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->in(__DIR__ . '/tools')
;
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers())
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'strict_comparison' => true,
'phpdoc_align' => false,
'phpdoc_to_comment' => false,
'native_function_invocation' => false,
MultilinePromotedPropertiesFixer::name() => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
])
->setFinder($finder)
;