forked from FOSSBilling/FOSSBilling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
64 lines (57 loc) · 1.79 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
57
58
59
60
61
62
63
64
<?php
/**
* FOSSBilling
*
* @copyright FOSSBilling (https://www.fossbilling.org)
* @license Apache-2.0
*
* This file may contain code previously used in the BoxBilling project.
* Copyright BoxBilling, Inc 2011-2021
*
* 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'
FOSSBilling.
@copyright FOSSBilling (https://www.fossbilling.org)
@license Apache-2.0
Copyright FOSSBilling 2022
This software may contain code previously used in the BoxBilling project.
Copyright BoxBilling, Inc 2011-2021
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',
'vendor',
'install',
'bb-modules/Wysiwyg',
'bb-modules/Servicecentovacast',
'bb-modules/Servicesolusvm',
'bb-modules/Spamchecker'
])
->notPath(
'rb.php',
'bb-config-sample.php'
)
)
;