-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy path.php-cs-fixer.dist.php
35 lines (33 loc) · 1.17 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/packages/plugin')
->filter(
// Ignore _bootstrap.php files
static function (\SplFileInfo $file) {
return !preg_match('/_bootstrap\.php$/', $file->getRealPath());
}
)
;
return (new PhpCsFixer\Config())
->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP80Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@PhpCsFixer' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_nested_dirname' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'protected_to_private' => false,
'single_trait_insert_per_statement' => true,
'ternary_to_null_coalescing' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'php_unit_internal_class' => false,
])
->setRiskyAllowed(true)
->setFinder($finder)
->setCacheFile(__DIR__.'/.php-cs-fixer.cache')
;