forked from FOSSBilling/FOSSBilling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
53 lines (47 loc) · 1.39 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
<?php
/**
* BoxBilling.
*
* @copyright BoxBilling, Inc (https://www.boxbilling.org)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE
*/
if (!file_exists(__DIR__ . '/src')) {
exit(0);
}
$fileHeaderComment = <<<'EOF'
BoxBilling.
@copyright BoxBilling, Inc (https://www.boxbilling.org)
@license Apache-2.0
Copyright BoxBilling, Inc
This source file is subject to the Apache-2.0 License that is bundled
with this source code in the file LICENSE
EOF;
return (new PhpCsFixer\Config())
->setRules([
'@PHP74Migration' => true,
'@Symfony' => true,
'header_comment' => ['header' => $fileHeaderComment, 'comment_type' => 'PHPDoc'],
'concat_space' => ['spacing' => 'one'],
'protected_to_private' => false,
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false],
])
->setRiskyAllowed(false)
->setFinder(
(new PhpCsFixer\Finder())
->in(__DIR__ . '/src')
->exclude([
'bb-data',
'bb-library',
'bb-locale',
'bb-themes',
'bb-vendor',
'install',
'bb-modules/Wysiwyg',
])
->notPath('rb.php')
)
;