Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | 6 | public function validateSchema(CheckRequest $checkRequest): void |
|
21 | { |
||
22 | 6 | $schemaLocation = $checkRequest->getResponseSchemaLocation(); |
|
23 | 6 | $schemaValidatorFactory = $this->getSchemaValidatorFactory(); |
|
24 | |||
25 | 6 | if (!$schemaValidatorFactory->hasSchema($schemaLocation)) { |
|
26 | 6 | $schemaValidatorFactory->registerSchema($schemaLocation, $schemaLocation); |
|
27 | } |
||
28 | |||
29 | 6 | $schemaValidator = $schemaValidatorFactory->getValidator($schemaLocation); |
|
30 | |||
31 | 6 | $checkRequest->setValidationResult($schemaValidator->validate($checkRequest->getContent())); |
|
32 | 6 | } |
|
39 |