-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.php-cs-fixer.dist.php
57 lines (51 loc) · 1.68 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
48
49
50
51
52
53
54
55
56
57
<?php
/*
* This file is part of By Night.
* (c) 2013-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 By Night.
(c) 2013-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__ . '/migrations',
__DIR__ . '/public',
__DIR__ . '/src',
__DIR__ . '/tests',
])
->append([
__FILE__,
__DIR__ . '/.twig-cs-fixer.php',
__DIR__ . '/rector.php',
])
;
$config = new PhpCsFixer\Config();
return $config
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
'array_syntax' => ['syntax' => 'short'],
'phpdoc_summary' => false,
'no_superfluous_phpdoc_tags' => true,
'header_comment' => ['header' => $header],
'concat_space' => ['spacing' => 'one'],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => false,
'import_functions' => false,
],
'native_constant_invocation' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
])
->setRiskyAllowed(true)
->setFinder($finder)
->setCacheFile(__DIR__ . '/var/.php-cs-fixer.cache');