Conditions | 3 |
Paths | 3 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
17 | 42 | public function validate(MagicResource $resource) |
|
18 | { |
||
19 | 42 | $container = ValidatorContainer::load(); |
|
20 | |||
21 | $validators = [ |
||
22 | 42 | 'right.type', |
|
23 | 'mandatory.conditional', |
||
24 | 'mandatory.property', |
||
25 | 'mandatory.without.default', |
||
26 | 'allowed.properties', |
||
27 | 'allowed.values', |
||
28 | 'rewrite.values', |
||
29 | 'allowed.ranges', |
||
30 | 'right.type', |
||
31 | ]; |
||
32 | |||
33 | 42 | foreach ($validators as $name) { |
|
34 | 42 | if ($container->contains($name)) { |
|
35 | 42 | $container->get($name)->check($resource); |
|
36 | } |
||
37 | } |
||
38 | 27 | } |
|
39 | } |
||
40 |