Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
17 | 6 | public function getValidator(string $id): SchemaValidatorInterface |
|
18 | { |
||
19 | 6 | $this->assertHasSchema($id); |
|
20 | |||
21 | 5 | if (!$this->registeredSchemas[$id] instanceof JsonSchemaValidator) { |
|
22 | 5 | $this->registeredSchemas[$id] = new JsonSchemaValidator($this->createSchema($id), new Validator()); |
|
23 | } |
||
24 | |||
25 | 5 | return $this->registeredSchemas[$id]; |
|
26 | } |
||
55 |