Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2.0078 |
Changes | 0 |
1 | <?php |
||
18 | 2 | protected function loadSchema($fetchUri) |
|
19 | { |
||
20 | 2 | if (isset($this->schemaCache[$fetchUri])) { |
|
21 | return $this->schemaCache[$fetchUri]; |
||
22 | } |
||
23 | |||
24 | 2 | $contents = $this->getUriRetriever()->retrieve($fetchUri); |
|
25 | |||
26 | 2 | $contents = Yaml::parse($contents); |
|
27 | 2 | $jsonSchema = json_decode(json_encode($contents)); |
|
28 | |||
29 | 2 | $this->schemaCache[$fetchUri] = $jsonSchema; |
|
30 | |||
31 | 2 | return $jsonSchema; |
|
32 | } |
||
34 |