-
Notifications
You must be signed in to change notification settings - Fork 6
/
.php-cs-fixer.dist.php
56 lines (48 loc) · 1.53 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
<?php
declare(strict_types=1);
/*
* This file is part of the CFONB Parser package.
*
* (c) SILARHI <[email protected]>
* (c) @fezfez <[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 the CFONB Parser package.
(c) SILARHI <[email protected]>
(c) @fezfez <[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__ . '/src',
__DIR__ . '/tests',
])
->append([
__FILE__,
__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'],
'native_constant_invocation' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'global_namespace_import' => ['import_functions' => true],
'declare_strict_types' => true,
])
->setRiskyAllowed(true)
->setFinder($finder);