| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 2 | public function getValidator(string $id): SchemaValidatorInterface |
|
| 13 | { |
||
| 14 | 2 | $this->assertHasSchema($id); |
|
| 15 | |||
| 16 | 2 | if (!$this->registeredSchemas[$id] instanceof XmlSchemaValidator) { |
|
| 17 | 2 | $this->registeredSchemas[$id] = new XmlSchemaValidator($this->fileLocator->locate($this->registeredSchemas[$id])); |
|
|
|
|||
| 18 | } |
||
| 19 | |||
| 20 | 2 | return $this->registeredSchemas[$id]; |
|
| 21 | } |
||
| 23 |