Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function check(mixed $value): bool |
||
36 | { |
||
37 | 2 | $this->requireParameters(['keys']); |
|
38 | |||
39 | if (! is_array($value)) { |
||
40 | 2 | return false; |
|
41 | } |
||
42 | |||
43 | foreach (array_keys($value) as $test) { |
||
44 | if (! in_array($test, $this->parameter('keys'), true)) { |
||
45 | 2 | return false; |
|
46 | } |
||
47 | } |
||
48 | |||
49 | 2 | return true; |
|
50 | } |
||
52 |