Conditions | 5 |
Paths | 6 |
Total Lines | 30 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function check(Whitelist $list, Tokenizer $tokenizer, ErrorCollector $ec) |
||
23 | { |
||
24 | $result = true; |
||
25 | $required = ListNormalizer::normalize($list->required['methods']); |
||
26 | |||
27 | $found = []; |
||
28 | |||
29 | foreach ($tokenizer->getStaticMethodCalls() as $token) |
||
30 | { |
||
31 | if (!empty($required[$token->value])) |
||
32 | { |
||
33 | $found[$token->value]; |
||
34 | continue; |
||
35 | } |
||
36 | } |
||
37 | |||
38 | $result = count($required) === count($found); |
||
39 | |||
40 | if (!$result) |
||
41 | { |
||
42 | $diff = array_diff_key($required, $found); |
||
43 | |||
44 | foreach ($diff as $value) |
||
45 | { |
||
46 | $token = new StaticMethod($value, $tokenizer->getTokens(), 0); |
||
47 | $ec->required($token); |
||
48 | } |
||
49 | } |
||
50 | |||
51 | return $result; |
||
52 | } |
||
54 | } |
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