| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function __invoke(Request $request, Application $app) |
||
| 25 | { |
||
| 26 | $store = $this->getStoreForType('schema', $app); |
||
| 27 | |||
| 28 | if ($app["debug"] && !$store->contains($this->schema)) { |
||
| 29 | $store->save( |
||
| 30 | $this->schema, |
||
| 31 | json_decode($app["twig"]->render("$this->template.json.twig", $this->replacements)) |
||
| 32 | ); |
||
| 33 | } |
||
| 34 | |||
| 35 | $app["json-schema.schema-store"]->add($this->schema, $store->fetch($this->schema)); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |