-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
38 lines (32 loc) · 919 Bytes
/
.php-cs-fixer.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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
use PHPyh\CodingStandard\PhpCsFixerCodingStandard;
$finder = (new Finder())
->in([
__DIR__ . '/config',
__DIR__ . '/src',
__DIR__ . '/views',
__DIR__ . '/web',
])
->append([
__FILE__,
__DIR__ . '/composer-unused.php',
__DIR__ . '/rector.php',
__DIR__ . '/yii',
])
->exclude('var')
;
$config = (new Config())
->setCacheFile(__DIR__ . '/var/.php-cs-fixer.cache')
->setParallelConfig(ParallelConfigFactory::detect())
->setFinder($finder)
;
(new PhpCsFixerCodingStandard())->applyTo($config, [
'method_chaining_indentation' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'single_line_empty_body' => false,
]);
return $config;