-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.php
65 lines (54 loc) · 1.56 KB
/
.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
declare(strict_types=1);
/**
* This file is part of the guanguans/valet-drivers.
*
* (c) guanguans <ityaozm@gmail.com>
*
* This source file is subject to the MIT license that is bundled.
*/
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$header = <<<'HEADER'
This file is part of the guanguans/valet-drivers.
(c) guanguans <ityaozm@gmail.com>
This source file is subject to the MIT license that is bundled.
HEADER;
$finder = Finder::create()
->in([
__DIR__.'/Drivers',
])
->append(glob(__DIR__.'/{*,.*}.php', GLOB_BRACE))
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
;
return (new Config())
->setFinder($finder)
->setRiskyAllowed(false)
->setUsingCache(false)
->setCacheFile(__DIR__.'/.php-cs-fixer.cache')
->setRules([
'@PHP70Migration' => true,
// '@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
// '@PHP71Migration:risky' => true,
// '@PHP73Migration' => true,
// '@PHP74Migration' => true,
// '@PHP74Migration:risky' => true,
// '@PHP80Migration' => true,
// '@PHP80Migration:risky' => true,
// '@PHP81Migration' => true,
// '@PHP82Migration' => true,
'@PhpCsFixer' => true,
// '@PhpCsFixer:risky' => true,
// comment
'header_comment' => [
'header' => $header,
'comment_type' => 'PHPDoc',
'location' => 'after_declare_strict',
'separate' => 'both',
],
'empty_loop_condition' => false,
])
;