Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
27 | 79 | public function validate(array $data) |
|
28 | { |
||
29 | 79 | $loader = new YamlLoader(); |
|
30 | 79 | $schemaContent = $loader->loadFromFile(__DIR__.'/../definitionSchema.yml'); |
|
31 | 79 | $schema = new MetaYaml($schemaContent); |
|
32 | try { |
||
33 | 79 | $schema->validate($data); |
|
34 | 1 | } catch (\Exception $e) { |
|
35 | 1 | throw new \LogicException($e->getMessage(), $e->getCode(), $e); |
|
36 | } |
||
37 | 79 | } |
|
38 | |||
40 |