-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.php-cs-fixer.php
31 lines (29 loc) · 1.09 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
<?php
$finder = (new PhpCsFixer\Finder())
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->append([__DIR__ . '/castor.php'])
->exclude(['cache', 'Bundle/Resources/var'])
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->registerCustomFixers((new PhpCsFixerCustomFixers\Fixers()))
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'yoda_style' => false,
'native_constant_invocation' => false,
'no_superfluous_phpdoc_tags' => [
'remove_inheritdoc' => false,
],
'declare_strict_types' => true,
'no_trailing_comma_in_singleline' => false,
'function_declaration' => ['trailing_comma_single_line' => true],
'phpdoc_to_comment' => ['allow_before_return_statement' => true],
'psr_autoloading' => false, // Does not work well with "map.php" files in tests
PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true,
])
->setFinder($finder)
;