Completed
Push — master ( 76b665...536063 )
by
unknown
01:45
created
src/Response.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 namespace PhpRestfulApiResponse;
10 10
 
11
+use InvalidArgumentException;
11 12
 use League\Fractal\Manager;
12 13
 use League\Fractal\Pagination\Cursor;
13 14
 use League\Fractal\Resource\Collection;
@@ -15,7 +16,6 @@  discard block
 block discarded – undo
15 16
 use League\Fractal\TransformerAbstract;
16 17
 use PhpRestfulApiResponse\Contracts\PhpRestfulApiResponse;
17 18
 use Zend\Diactoros\MessageTrait;
18
-use InvalidArgumentException;
19 19
 
20 20
 class Response implements PhpRestfulApiResponse
21 21
 {
Please login to merge, or discard this patch.
Doc Comments   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     }
171 171
 
172 172
     /**
173
-     * @param $data
173
+     * @param Tests\unit\Lib\Book $data
174 174
      * @param TransformerAbstract|callable $transformer
175 175
      * @param int $code
176 176
      * @param null $resourceKey
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     }
195 195
 
196 196
     /**
197
-     * @param $data
197
+     * @param Tests\unit\Lib\Book[] $data
198 198
      * @param TransformerAbstract|callable $transformer
199 199
      * @param int $code
200 200
      * @param null $resourceKey
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      * @param string|array $message
229 229
      * @param string $code
230 230
      * @param array  $headers
231
-     * @return mixed
231
+     * @return Response
232 232
      */
233 233
     public function withError($message, $code, array $headers = [])
234 234
     {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      *
256 256
      * @param string $message
257 257
      * @param array  $headers
258
-     * @return mixed
258
+     * @return Response
259 259
      */
260 260
     public function errorForbidden(string $message = '', array $headers = [])
261 261
     {
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      *
268 268
      * @param string $message
269 269
      * @param array  $headers
270
-     * @return mixed
270
+     * @return Response
271 271
      */
272 272
     public function errorInternalError(string $message = '', array $headers = [])
273 273
     {
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      *
280 280
      * @param string $message
281 281
      * @param array  $headers
282
-     * @return mixed
282
+     * @return Response
283 283
      */
284 284
     public function errorNotFound(string $message = '', array $headers = [])
285 285
     {
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      *
292 292
      * @param string $message
293 293
      * @param array $headers
294
-     * @return mixed
294
+     * @return Response
295 295
      */
296 296
     public function errorUnauthorized(string $message = '', array $headers = [])
297 297
     {
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
      *
304 304
      * @param array $message
305 305
      * @param array $headers
306
-     * @return mixed
306
+     * @return Response
307 307
      */
308 308
     public function errorWrongArgs(array $message, array $headers = [])
309 309
     {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
      *
316 316
      * @param string $message
317 317
      * @param array $headers
318
-     * @return mixed
318
+     * @return Response
319 319
      */
320 320
     public function errorGone(string $message = '', array $headers = [])
321 321
     {
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
      *
328 328
      * @param string $message
329 329
      * @param array $headers
330
-     * @return mixed
330
+     * @return Response
331 331
      */
332 332
     public function errorMethodNotAllowed(string $message = '', array $headers = [])
333 333
     {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
      *
340 340
      * @param string $message
341 341
      * @param array $headers
342
-     * @return mixed
342
+     * @return Response
343 343
      */
344 344
     public function errorUnwillingToProcess(string $message = '', array $headers = [])
345 345
     {
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      *
352 352
      * @param string $message
353 353
      * @param array $headers
354
-     * @return mixed
354
+     * @return Response
355 355
      */
356 356
     public function errorUnprocessable(string $message = '', array $headers = [])
357 357
     {
Please login to merge, or discard this patch.
tests/unit/ResponseTest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -292,6 +292,9 @@
 block discarded – undo
292 292
         $this->assertEquals(201, $this->response->getStatusCode());
293 293
     }
294 294
 
295
+    /**
296
+     * @param integer $code
297
+     */
295 298
     private function withError(Response $response, $code, $message = null)
296 299
     {
297 300
         $this->assertEquals($code, $response->getStatusCode());
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 
9 9
 namespace PhpRestfulApiResponse\Tests\unit;
10 10
 
11
+use InvalidArgumentException;
11 12
 use PhpRestfulApiResponse\Response;
12 13
 use PhpRestfulApiResponse\Tests\unit\Lib\Book;
13 14
 use ReflectionClass;
14
-use InvalidArgumentException;
15 15
 
16 16
 class ResponseTest extends Base
17 17
 {
Please login to merge, or discard this patch.