Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 3 | public function __invoke(Request $request, Response $response, Application $app) |
|
27 | { |
||
28 | 3 | if ($response->isSuccessful()) { |
|
29 | 3 | $schema= $this->schemaId?SchemaHandler::getSchemaUrl($this->schemaId, $app):'http://json-schema.org/hyper-schema'; |
|
30 | 3 | $response->headers->set("Content-Type", "application/json; profile=\"$schema\""); |
|
31 | } |
||
32 | |||
33 | 3 | return $response; |
|
34 | } |
||
35 | } |
||
36 |