| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function assertValid(SchemaInterface $schema): void |
||
| 35 | { |
||
| 36 | $errors = $this->validate($schema); |
||
| 37 | |||
| 38 | if (!empty($errors)) { |
||
| 39 | $message = \implode("\n", \array_map(function (SchemaValidationException $error) { |
||
| 40 | return $error->getMessage(); |
||
| 41 | }, $errors)); |
||
| 42 | |||
| 43 | throw new SchemaValidationException($message); |
||
| 44 | } |
||
| 55 |