@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | protected function getDocBlockResponse(array $tags) |
| 33 | 33 | { |
| 34 | - $responseTags = array_filter($tags, function ($tag) { |
|
| 34 | + $responseTags = array_filter($tags, function($tag) { |
|
| 35 | 35 | return $tag instanceof Tag && strtolower($tag->getName()) === 'response'; |
| 36 | 36 | }); |
| 37 | 37 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | return; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - return array_map(function ($responseTag) { |
|
| 42 | + return array_map(function($responseTag) { |
|
| 43 | 43 | preg_match('/^(\d{3})?\s?([\s\S]*)$/', $responseTag->getContent(), $result); |
| 44 | 44 | |
| 45 | 45 | $status = $result[1] ?: 200; |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | protected function getFileResponse(array $tags) |
| 33 | 33 | { |
| 34 | - $responseFileTags = array_filter($tags, function ($tag) { |
|
| 34 | + $responseFileTags = array_filter($tags, function($tag) { |
|
| 35 | 35 | return $tag instanceof Tag && strtolower($tag->getName()) === 'responsefile'; |
| 36 | 36 | }); |
| 37 | 37 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | return; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - return array_map(function ($responseFileTag) { |
|
| 42 | + return array_map(function($responseFileTag) { |
|
| 43 | 43 | preg_match('/^(\d{3})?\s?([\s\S]*)$/', $responseFileTag->getContent(), $result); |
| 44 | 44 | |
| 45 | 45 | $status = $result[1] ?: 200; |
@@ -50,9 +50,9 @@ |
||
| 50 | 50 | /** @var JsonResponse|array|null $response */ |
| 51 | 51 | $response = $strategy($this->route, $tags, $routeProps); |
| 52 | 52 | |
| 53 | - if (! is_null($response)) { |
|
| 53 | + if (!is_null($response)) { |
|
| 54 | 54 | if (is_array($response)) { |
| 55 | - return array_map(function (JsonResponse $response) { |
|
| 55 | + return array_map(function(JsonResponse $response) { |
|
| 56 | 56 | return ['status' => $response->getStatusCode(), 'content' => $this->getResponseContent($response)]; |
| 57 | 57 | }, $response); |
| 58 | 58 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | - * @param $route |
|
| 66 | + * @param Route $route |
|
| 67 | 67 | * @param $tags |
| 68 | 68 | * @param $routeProps |
| 69 | 69 | * |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * @param $response |
|
| 78 | + * @param JsonResponse $response |
|
| 79 | 79 | * |
| 80 | 80 | * @return mixed |
| 81 | 81 | */ |