Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class ValidVariableNameSniff implements Sniff |
||
13 | { |
||
14 | /** @var array */ |
||
15 | public $allowedNames = [ |
||
16 | '_GET', |
||
17 | '_POST', |
||
18 | '_COOKIE', |
||
19 | '_FILES', |
||
20 | '_REQUEST', |
||
21 | '_SERVER', |
||
22 | '_SESSION' |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * Listen to variable name tokens. |
||
27 | * |
||
28 | * @return int[] |
||
29 | */ |
||
30 | public function register() |
||
31 | { |
||
32 | return [T_VARIABLE]; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Check variable names to make sure no underscores are used. |
||
37 | * |
||
38 | * @param File $phpcsFile |
||
39 | * @param int $stackPtr |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function process(File $phpcsFile, $stackPtr) |
||
55 | ); |
||
56 | } |
||
59 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths