| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | protected function getPdfFileResponses(array $tags) |
||
| 34 | { |
||
| 35 | // avoid "holes" in the keys of the filtered array, by using array_values on the filtered array |
||
| 36 | $responsePdfFileTags = array_values( |
||
| 37 | array_filter($tags, function ($tag) { |
||
| 38 | return $tag instanceof Tag && strtolower($tag->getName()) === 'responsepdffile'; |
||
| 39 | }) |
||
| 40 | ); |
||
| 41 | |||
| 42 | if (empty($responsePdfFileTags)) { |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | |||
| 46 | return array_map(function (Tag $responsePdfFileTag) { |
||
|
|
|||
| 47 | return new JsonResponse(null, 200, ['Content-Type' => 'application/pdf']); |
||
| 48 | }, $responsePdfFileTags); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.