Conditions | 5 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 32 | public function check(Resource $resource) |
|
20 | { |
||
21 | 32 | foreach ($resource->mandatory() as $key => $value) { |
|
22 | 19 | if (isset($value['when']['has_value'])) { |
|
23 | 4 | $name = $value['when']['property']; |
|
24 | 4 | $value = $value['when']['has_value']; |
|
25 | |||
26 | 4 | if (is_array($value)) { |
|
27 | 3 | foreach ($value as $item) { |
|
28 | 3 | $this->ensurePropertyNameHasKey($resource, $item, $name, $key); |
|
29 | } |
||
30 | } else { |
||
31 | 1 | $this->ensurePropertyNameHasKey($resource, $value, $name, $key); |
|
32 | } |
||
33 | } |
||
34 | } |
||
35 | 30 | } |
|
36 | |||
48 |