forked from yyzhao1123/SMSBombing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packet.php
102 lines (85 loc) · 2.58 KB
/
packet.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/*
* This file is part of james.xue/sms-bombing.
*
* (c) xiaoxuan6 <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*
*/
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\{LevelSetList, SetList};
return [
'php-cs-fixer' => [
'header' => <<<HEADER
This file is part of james.xue/sms-bombing.
(c) xiaoxuan6 <[email protected]>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
HEADER,
'in' => [
__DIR__,
__DIR__ . DIRECTORY_SEPARATOR . 'app',
__DIR__ . DIRECTORY_SEPARATOR . 'bootstrap',
__DIR__ . DIRECTORY_SEPARATOR . 'config',
],
/**
* Adds rules that filenames must not match.
*
* You can use patterns (delimited with / sign) or simple strings.
*
* $finder->notPath('some/special/dir')
* $finder->notPath('/some\/special\/dir/') // same as above
* $finder->notPath(['some/file.txt', 'another/file.log'])
*/
'not-path' => [
],
/**
* Excludes directories.
*
* Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
*
* $finder->in(__DIR__)->exclude('ruby');
*/
'exclude' => [
__DIR__ . '/vendor',
],
/**
* Adds rules that files must match.
*
* You can use patterns (delimited with / sign), globs or simple strings.
*
* $finder->name('/\.php$/')
* $finder->name('*.php') // same as above, without dot files
* $finder->name('test.php')
* $finder->name(['test.py', 'test.php'])
*/
'name' => [
'*.php',
'generateMd.php',
],
/**
* Adds rules that files must not match.
*/
'not-name' => [
]
],
'rector' => [
'path' => [
__DIR__ . DIRECTORY_SEPARATOR . 'app',
__DIR__ . DIRECTORY_SEPARATOR . 'bootstrap',
__DIR__ . DIRECTORY_SEPARATOR . 'config',
],
'sets' => [
LevelSetList::UP_TO_PHP_81,
SetList::INSTANCEOF,
SetList::TYPE_DECLARATION,
SetList::EARLY_RETURN,
SetList::PHP_81,
],
'callable' => function (RectorConfig $rectorConfig) {
$rectorConfig->fileExtensions(['.php']);
}
]
];