Passed
Push — master ( 2a36b6...9694a0 )
by
unknown
01:43
created
src/Response.php 1 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 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -60,6 +60,9 @@
 block discarded – undo
60 60
         $this->assertEquals('{"data":[{"title":"how to be a ninja","author":{"name":"harry","email":"harryosmarsitohang"},"year":2017,"price":100000},{"title":"how to be a mage","author":{"name":"harry","email":"harryosmarsitohang"},"year":2016,"price":500000},{"title":"how to be a samurai","author":{"name":"harry","email":"harryosmarsitohang"},"year":2000,"price":25000}]}', $response->getBody()->__toString());
61 61
     }
62 62
 
63
+    /**
64
+     * @param integer $code
65
+     */
63 66
     private function withError(Response $response, $code, $message = null)
64 67
     {
65 68
         $this->assertEquals($code, $response->getStatusCode());
Please login to merge, or discard this patch.