-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php-cs-fixer.php
36 lines (30 loc) · 966 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
<?php
if (!file_exists(__DIR__ . '/src')) {
exit(0);
}
$fileHeaderComment = <<<'EOF'
This file is part of the Ip2Region package.
Copyright 2022 The Ip2Region Authors. All rights reserved.
Use of this source code is governed by a Apache2.0-style
license that can be found in the LICENSE file.
@link https://github.com/chinayin/ip2region-sdk-php
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
return (new PhpCsFixer\Config())
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@PHP71Migration' => true,
'@PHPUnit75Migration:risky' => true,
'header_comment' => ['header' => $fileHeaderComment],
])
->setFinder(
PhpCsFixer\Finder::create()
->ignoreVCSIgnored(true)
->files()
->name('*.php')
->exclude('vendor')
->in(__DIR__)
);