-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.php-cs-fixer.dist.php
47 lines (41 loc) · 1.3 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
45
46
47
<?php
/*
* This file is part of SILARHI.
* (c) 2019 - present Guillaume Sainthillier <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
$header = <<<'EOF'
This file is part of SILARHI.
(c) 2019 - present Guillaume Sainthillier <[email protected]>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/config')
->in(__DIR__ . '/public')
->in(__DIR__ . '/src')
->append([
__FILE__,
__DIR__ . '/.twig-cs-fixer.php',
__DIR__ . '/rector.php',
])
;
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'header_comment' => ['header' => $header],
'concat_space' => ['spacing' => 'one'],
'native_constant_invocation' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'global_namespace_import' => [
'import_classes' => true,
],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
])
->setRiskyAllowed(true)
->setFinder($finder)
->setCacheFile(__DIR__ . '/var/tools/.php-cs-fixer.cache');