| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 2 | protected function createSchema(string $id): \stdClass |
|
| 37 | { |
||
| 38 | 2 | $mainSchemaFilePath = $this->fileLocator->locate($this->registeredSchemas[$id]); |
|
| 39 | 2 | $schemaUri = basename($mainSchemaFilePath); |
|
| 40 | 2 | $schemaBaseUri = sprintf('file://%s/%s', dirname($mainSchemaFilePath), $schemaUri); |
|
| 41 | |||
| 42 | 2 | $retriever = new UriRetriever(); |
|
| 43 | 2 | $schema = $retriever->retrieve($schemaUri, $schemaBaseUri); |
|
| 44 | |||
| 45 | 2 | $schemaStorage = new SchemaStorage($retriever); |
|
| 46 | 2 | $schemaStorage->addSchema($schemaBaseUri, $schema); |
|
| 47 | |||
| 48 | 2 | return $schema; |
|
| 49 | } |
||
| 50 | } |
||
| 51 |