1 | <?php |
||
2 | |||
3 | namespace Validate\Traits; |
||
4 | |||
5 | /** |
||
6 | * Undocumented trait |
||
7 | */ |
||
8 | trait BlockStringTrait |
||
9 | { |
||
10 | /** |
||
11 | * Found many strings inside multiples arrays |
||
12 | * |
||
13 | * @param array $blocks |
||
14 | * @return boolean |
||
15 | */ |
||
16 | public static function foundInMultiplesArrays(array $blocks): boolean |
||
0 ignored issues
–
show
|
|||
17 | { |
||
18 | foreach ($blocks as $block) { |
||
19 | if (static::foundInArray($block[0], $block[1])) { |
||
20 | return true; |
||
0 ignored issues
–
show
|
|||
21 | } |
||
22 | } |
||
23 | return false; |
||
0 ignored issues
–
show
|
|||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Found string inside array |
||
28 | * |
||
29 | * @param string $field |
||
30 | * @param array $array |
||
31 | * @return bool |
||
32 | */ |
||
33 | public static function foundInArray(string $field, array $array): boolean |
||
34 | { |
||
35 | foreach ($array as $notPermit) { |
||
36 | if (strpos($field, $notPermit) !== false) { |
||
37 | return true; |
||
0 ignored issues
–
show
|
|||
38 | } |
||
39 | } |
||
40 | return false; |
||
0 ignored issues
–
show
|
|||
41 | } |
||
42 | } |
||
43 |
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