| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | 4 | public function decode($schema) |
|
| 17 | { |
||
| 18 | try { |
||
| 19 | 4 | return Yaml::parse($schema, Yaml::PARSE_OBJECT_FOR_MAP | Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); |
|
| 20 | 2 | } catch (ParseException $e) { |
|
| 21 | 2 | throw new DecodingException(sprintf('Invalid Yaml: %s', $e->getMessage()), $e->getCode(), $e); |
|
| 22 | } |
||
| 23 | } |
||
| 24 | } |
||
| 25 |