Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function createResponse($responseData) |
||
24 | { |
||
25 | if ($responseData instanceof Image) { |
||
26 | $imagesBasePath = $this->filePath . '/images/'; |
||
27 | $imagePath = $imagesBasePath . $responseData->getName(); |
||
28 | $response = new FileResponse($imagePath); |
||
29 | } else { |
||
30 | throw new UnsupportedTypeException(); |
||
31 | } |
||
32 | |||
33 | return $response; |
||
34 | } |
||
35 | |||
41 |