@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $key = $this->returnKeyType($keyType); |
| 82 | 82 | |
| 83 | 83 | $query->cols(['*']) |
| 84 | - ->where("{$key} = {$id}"); |
|
| 84 | + ->where("{$key} = {$id}"); |
|
| 85 | 85 | |
| 86 | 86 | return $this->fireStatementAndReturn($query, true); |
| 87 | 87 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $key = $this->returnKeyType($keyType); |
| 100 | 100 | |
| 101 | 101 | $query->cols(['*']) |
| 102 | - ->where("{$key} = {$id}"); |
|
| 102 | + ->where("{$key} = {$id}"); |
|
| 103 | 103 | |
| 104 | 104 | return $this->fireStatementAndReturn($query); |
| 105 | 105 | } |
@@ -272,7 +272,7 @@ |
||
| 272 | 272 | { |
| 273 | 273 | $queryString = $request->query->get('embed'); |
| 274 | 274 | |
| 275 | - if (! empty($queryString)) { |
|
| 275 | + if (!empty($queryString)) { |
|
| 276 | 276 | $this->fractal->parseIncludes($request->query->get('embed')); |
| 277 | 277 | } |
| 278 | 278 | } |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | * Builds an item response in Fractal then hands off to the responder |
| 102 | 102 | * |
| 103 | 103 | * @param array $item The item to transform |
| 104 | - * @param mixed $callback The Transformer to pass through to Fractal |
|
| 104 | + * @param \League\Fractal\TransformerAbstract $callback The Transformer to pass through to Fractal |
|
| 105 | 105 | * @param \Symfony\Component\HttpFoundation\Response The client's response |
| 106 | 106 | * |
| 107 | - * @return array |
|
| 107 | + * @return Response |
|
| 108 | 108 | */ |
| 109 | 109 | protected function respondWithItem($item, $callback, Response $response) |
| 110 | 110 | { |
@@ -118,10 +118,10 @@ discard block |
||
| 118 | 118 | * Builds a collection of items from Fractal then hands off to the responder |
| 119 | 119 | * |
| 120 | 120 | * @param array $collection The collection to transform |
| 121 | - * @param mixed $callback The Transformer to pass through to Fractal |
|
| 121 | + * @param \League\Fractal\TransformerAbstract $callback The Transformer to pass through to Fractal |
|
| 122 | 122 | * @param \Symfony\Component\HttpFoundation\Response The client's response |
| 123 | 123 | * |
| 124 | - * @return array |
|
| 124 | + * @return Response |
|
| 125 | 125 | */ |
| 126 | 126 | protected function respondWithCollection($collection, $callback, Response $response) |
| 127 | 127 | { |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * @param string $message Response message to put in the error |
| 157 | 157 | * @param int $errorCode Error code to set |
| 158 | 158 | * |
| 159 | - * @return array |
|
| 159 | + * @return Response |
|
| 160 | 160 | */ |
| 161 | 161 | protected function respondWithError(Response $response, $message, $errorCode) |
| 162 | 162 | { |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | * @param \Symfony\Component\HttpFoundation\Response $response |
| 184 | 184 | * @param string $message |
| 185 | 185 | * |
| 186 | - * @return void |
|
| 186 | + * @return Response |
|
| 187 | 187 | */ |
| 188 | 188 | public function errorEmpty(Response $response, $message = 'No data / Empty') |
| 189 | 189 | { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * @param \Symfony\Component\HttpFoundation\Response $response |
| 198 | 198 | * @param string $message |
| 199 | 199 | * |
| 200 | - * @return void |
|
| 200 | + * @return Response |
|
| 201 | 201 | */ |
| 202 | 202 | public function errorForbidden(Response $response, $message = 'Forbidden') |
| 203 | 203 | { |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | * @param \Symfony\Component\HttpFoundation\Response $response |
| 212 | 212 | * @param string $message |
| 213 | 213 | * |
| 214 | - * @return void |
|
| 214 | + * @return Response |
|
| 215 | 215 | */ |
| 216 | 216 | public function errorInternalError(Response $response, $message = 'Internal Error') |
| 217 | 217 | { |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | * @param \Symfony\Component\HttpFoundation\Response $response |
| 226 | 226 | * @param string $message |
| 227 | 227 | * |
| 228 | - * @return void |
|
| 228 | + * @return Response |
|
| 229 | 229 | */ |
| 230 | 230 | public function errorNotFound(Response $response, $message = 'Resource Not Found') |
| 231 | 231 | { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * @param \Symfony\Component\HttpFoundation\Response $response |
| 240 | 240 | * @param string $message |
| 241 | 241 | * |
| 242 | - * @return void |
|
| 242 | + * @return Response |
|
| 243 | 243 | */ |
| 244 | 244 | public function errorUnauthorized(Response $response, $message = 'Unauthorized') |
| 245 | 245 | { |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | /** |
| 251 | 251 | * Generates a Response with a 400 HTTP header and a given message. |
| 252 | 252 | * |
| 253 | - * @param \Symfony\Component\HttpFoundation\Response $Response |
|
| 253 | + * @param \Symfony\Component\HttpFoundation\Response $response |
|
| 254 | 254 | * @param string $message |
| 255 | 255 | * |
| 256 | 256 | * @return \Symfony\Component\HttpFoundation\Response |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Construct |
| 16 | 16 | * |
| 17 | - * @param Ps2alerts\Api\Repository\AlertRepository $repository |
|
| 18 | - * @param Ps2alerts\Api\Transformer\AlertTransformer $transformer |
|
| 19 | - * @param League\Fractal\Manager $fractal |
|
| 17 | + * @param AlertRepository $repository |
|
| 18 | + * @param AlertTransformer $transformer |
|
| 19 | + * @param Manager $fractal |
|
| 20 | 20 | */ |
| 21 | 21 | public function __construct( |
| 22 | 22 | AlertRepository $repository, |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @see AbstractEndpointController::respondWithItem |
| 35 | 35 | * |
| 36 | - * @param Symfony\Component\HttpFoundation\Request $request |
|
| 37 | - * @param Symfony\Component\HttpFoundation\Response $response |
|
| 36 | + * @param Request $request |
|
| 37 | + * @param Response $response |
|
| 38 | 38 | * @param array |
| 39 | 39 | * |
| 40 | - * @return array |
|
| 40 | + * @return Response |
|
| 41 | 41 | */ |
| 42 | 42 | public function getSingle(Request $request, Response $response, array $args) |
| 43 | 43 | { |