| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function check($value, $match) |
||
| 30 | { |
||
| 31 | try { |
||
| 32 | $xml = $this->decode($value); |
||
| 33 | } catch (\DomException $e) { |
||
| 34 | throw new ValidatorException($e->getMessage()); |
||
| 35 | } |
||
| 36 | |||
| 37 | if (0 === $xml->xpath($match)->length) { |
||
| 38 | throw new ValidatorException(sprintf('this node "%s" does not exist', $match)); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 62 |