-
-
Notifications
You must be signed in to change notification settings - Fork 200
/
.php-cs-fixer.dist.php
44 lines (41 loc) · 1.5 KB
/
.php-cs-fixer.dist.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
44
<?php
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->in(__DIR__.'/config')
->in(__DIR__.'/migrations')
->in(__DIR__.'/features')
;
return (new PhpCsFixer\Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRules([
'@PHP82Migration' => true,
'@PHP80Migration:risky' => true,
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'phpdoc_summary' => false,
'no_unneeded_final_method' => false,
'declare_strict_types' => false,
'use_arrow_functions' => false,
'void_return' => false,
'phpdoc_separation' => false,
'no_superfluous_phpdoc_tags' => true,
'concat_space' => ['spacing' => 'none'],
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'phpdoc_to_comment' => false,
'native_constant_invocation' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'App/doctrine_migration_clean' => true,
'attribute_empty_parentheses' => true,
'ordered_attributes' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
->setCacheFile(__DIR__.'/var/.php_cs/.php_cs.cache')
->registerCustomFixers([
new App\Fixer\DoctrineMigrationCleanFixer(),
])
;