Completed
Pull Request — master (#143)
by
unknown
04:07
created
library/Respect/Rest/Routes/StaticValue.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -17,6 +17,11 @@
 block discarded – undo
17 17
     /** @var ReflectionFunctionAbstract */
18 18
     protected $reflection;
19 19
 
20
+    /**
21
+     * @param string $method
22
+     * @param string $pattern
23
+     * @param string $value
24
+     */
20 25
     public function __construct($method, $pattern, $value)
21 26
     {
22 27
         $this->value = $value;
Please login to merge, or discard this patch.
library/Respect/Rest/Routines/AbstractCallbackList.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -54,6 +54,10 @@
 block discarded – undo
54 54
 
55 55
         return array_key_exists($key, $this);
56 56
     }
57
+
58
+    /**
59
+     * @param string $needle
60
+     */
57 61
     public function filterKeysContain($needle)
58 62
     {
59 63
         return array_filter($this->getKeys(), function ($key) use ($needle) {
Please login to merge, or discard this patch.
library/Respect/Rest/Routines/AbstractSyncedRoutine.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     /**
42 42
      * Executes the routine and return its result.
43 43
      *
44
-     * @param  Respect\Rest\Request $request
44
+     * @param  Request $request
45 45
      * @param  array                $params
46 46
      * @return mixed
47 47
      */
Please login to merge, or discard this patch.
library/Respect/Rest/Router.php 1 patch
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      * @param callable $callback  Any callback for this route
320 320
      * @param array    $arguments Additional arguments for the callback
321 321
      *
322
-     * @return Respect\Rest\Routes\Callback The route instance
322
+     * @return Routes\Callback The route instance
323 323
      */
324 324
     public function callbackRoute(
325 325
         $method,
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
      * @param string $class     Some class name
342 342
      * @param array  $arguments The class constructor arguments
343 343
      *
344
-     * @return Respect\Rest\Routes\ClassName The route instance
344
+     * @return Routes\ClassName The route instance
345 345
      */
346 346
     public function classRoute($method, $path, $class, array $arguments = array())
347 347
     {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
      *                          catch. 'Exception' will catch them all.
388 388
      * @param string $callback  The function to run when an exception is cautght
389 389
      *
390
-     * @return Respect\Rest\Routes\Exception
390
+     * @return Routes\Exception
391 391
      */
392 392
     public function exceptionRoute($className, $callback = null)
393 393
     {
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
      *
403 403
      * @param string $callback The function to run when an error is cautght
404 404
      *
405
-     * @return Respect\Rest\Routes\Error
405
+     * @return Routes\Error
406 406
      */
407 407
     public function errorRoute($callback)
408 408
     {
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
      * @param string $className The class name of the factored instance
421 421
      * @param string $factory   Any callable
422 422
      *
423
-     * @return Respect\Rest\Routes\Factory The route created
423
+     * @return Routes\Factory The route created
424 424
      */
425 425
     public function factoryRoute($method, $path, $className, $factory)
426 426
     {
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
      * @param string $path    The URI Path (/foo/bar...)
470 470
      * @param string $instance An instance of Routinable
471 471
      *
472
-     * @return Respect\Rest\Routes\Instance The route created
472
+     * @return Routes\Instance The route created
473 473
      */
474 474
     public function instanceRoute($method, $path, $instance)
475 475
     {
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
      *
496 496
      * @param Request $request A request
497 497
      *
498
-     * @return bool true if the request doesn't apply for routes
498
+     * @return boolean|null true if the request doesn't apply for routes
499 499
      */
500 500
     public function isRoutelessDispatch(Request $request = null)
501 501
     {
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
      * @param string $path        The URI Path (/foo/bar...)
585 585
      * @param string $staticValue Some static value to be printed
586 586
      *
587
-     * @return Respect\Rest\Routes\StaticValue The route created
587
+     * @return Routes\StaticValue The route created
588 588
      */
589 589
     public function staticRoute($method, $path, $staticValue)
590 590
     {
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
     /**
632 632
      * Return routes matched by path
633 633
      *
634
-     * @return SplObjectStorage a list of routes matched by path
634
+     * @return \SplObjectStorage a list of routes matched by path
635 635
      */
636 636
     protected function getMatchedRoutesByPath()
637 637
     {
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
      *
727 727
      * @see Respect\Rest\Request::$params
728 728
      *
729
-     * @return bool true if the route matches the request with that params
729
+     * @return boolean|null true if the route matches the request with that params
730 730
      */
731 731
     protected function matchRoute(
732 732
         Request $request,
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
      *
746 746
      * @param \SplObjectStorage $matchedByPath A list of routes matched by path
747 747
      *
748
-     * @return bool true if route matches its routines
748
+     * @return Request|null true if route matches its routines
749 749
      */
750 750
     protected function routineMatch(\SplObjectStorage $matchedByPath)
751 751
     {
Please login to merge, or discard this patch.
library/Respect/Rest/Request.php 1 patch
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @see    Respect\Rest\Request::forwardErrors
76 76
      * @see    http://php.net/set_error_handler
77 77
      *
78
-     * @return mixed The previous error handler
78
+     * @return null|callable The previous error handler
79 79
      */
80 80
     protected function prepareForErrorForwards()
81 81
     {
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
      * Restores the previous error handler if present then check error routes
168 168
      * for logged errors, forwarding them or returning null silently
169 169
      *
170
-     * @param mixed $errorHandler Some error handler (internal or external to
170
+     * @param null|callable $errorHandler Some error handler (internal or external to
171 171
      *                            Respect)
172 172
      *
173
-     * @return mixed A route forwarding or a silent null
173
+     * @return string|null A route forwarding or a silent null
174 174
      */
175 175
     protected function forwardErrors($errorHandler)
176 176
     {
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
      * Does a catch-like operation on an exception based on previously
194 194
      * declared instances from Router::exceptionRoute
195 195
      *
196
-     * @param Exception $e Any exception
196
+     * @param \Exception $e Any exception
197 197
      *
198
-     * @return mixed A route forwarding or a silent null
198
+     * @return string|null A route forwarding or a silent null
199 199
      */
200 200
     protected function catchExceptions($e)
201 201
     {
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
      * Does a catch-like operation on an error based on previously
218 218
      * declared instances from Router::exceptionRoute
219 219
      *
220
-     * @param Error $e Any exception
220
+     * @param \Error $e Any exception
221 221
      *
222
-     * @return mixed A route forwarding or a silent null
222
+     * @return string|null A route forwarding or a silent null
223 223
      */
224 224
     protected function catchErrors($e)
225 225
     {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      * @param Routinable $routine Some routine instance
300 300
      * @param array      $params  Params from the routine
301 301
      *
302
-     * @return mixed Whatever the routine returns
302
+     * @return AbstractRoute Whatever the routine returns
303 303
      */
304 304
     public function routineCall($type, $method, Routinable $routine, &$params)
305 305
     {
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
      *
362 362
      * @param AbstractRoute $route Any route
363 363
      *
364
-     * @return Response from the forwarded route
364
+     * @return string from the forwarded route
365 365
      */
366 366
     public function forward(AbstractRoute $route)
367 367
     {
Please login to merge, or discard this patch.