@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * Add middleware |
| 49 | 49 | * |
| 50 | 50 | * @param string|callable|\CarbonFramework\Routing\Middleware\MiddlewareInterface|array $middleware |
| 51 | - * @return object |
|
| 51 | + * @return HasMiddlewareTrait |
|
| 52 | 52 | */ |
| 53 | 53 | public function addMiddleware( $middleware ) { |
| 54 | 54 | $middleware = is_array( $middleware ) ? $middleware : [$middleware]; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * Alias for addMiddleware |
| 68 | 68 | * |
| 69 | 69 | * @param string|callable|\CarbonFramework\Routing\Middleware\MiddlewareInterface|array $middleware |
| 70 | - * @return object |
|
| 70 | + * @return HasMiddlewareTrait |
|
| 71 | 71 | */ |
| 72 | 72 | public function add( $middleware ) { |
| 73 | 73 | return $this->addMiddleware( $middleware ); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * Execute an array of middleware recursively (last in, first out) |
| 78 | 78 | * |
| 79 | 79 | * @param \CarbonFramework\Routing\Middleware\MiddlewareInterface[] $middleware |
| 80 | - * @param mixed $request |
|
| 80 | + * @param \CarbonFramework\Request $request |
|
| 81 | 81 | * @param Closure $next |
| 82 | 82 | * @return ResponseInterface |
| 83 | 83 | */ |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * Constructor |
| 30 | 30 | * |
| 31 | - * @param string|ConditionInterface $target |
|
| 31 | + * @param string $target |
|
| 32 | 32 | * @param Closure $callable |
| 33 | 33 | */ |
| 34 | 34 | public function __construct( $target, Closure $callable ) { |
@@ -2,13 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace CarbonFramework\Routing; |
| 4 | 4 | |
| 5 | -use Closure; |
|
| 6 | -use Exception; |
|
| 7 | -use CarbonFramework\Url; |
|
| 8 | 5 | use CarbonFramework\Request; |
| 9 | 6 | use CarbonFramework\Routing\Conditions\ConditionInterface; |
| 10 | 7 | use CarbonFramework\Routing\Conditions\Url as UrlCondition; |
| 11 | 8 | use CarbonFramework\Routing\Middleware\HasMiddlewareTrait; |
| 9 | +use Closure; |
|
| 10 | +use Exception; |
|
| 12 | 11 | |
| 13 | 12 | class RouteGroup implements RouteInterface { |
| 14 | 13 | use HasRoutesTrait { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace CarbonFramework\Routing\Middleware; |
| 4 | 4 | |
| 5 | 5 | use Closure; |
| 6 | -use GuzzleHttp\Psr7; |
|
| 7 | 6 | use Flash; |
| 8 | 7 | use OldInput as OldInputService; |
| 9 | 8 | |
@@ -2,14 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace CarbonFramework\Routing; |
| 4 | 4 | |
| 5 | -use ReflectionClass; |
|
| 6 | -use Exception; |
|
| 7 | -use CarbonFramework\Url; |
|
| 8 | 5 | use CarbonFramework\Framework; |
| 9 | 6 | use CarbonFramework\Request; |
| 10 | 7 | use CarbonFramework\Routing\Conditions\ConditionInterface; |
| 11 | 8 | use CarbonFramework\Routing\Conditions\Url as UrlCondition; |
| 12 | 9 | use CarbonFramework\Routing\Middleware\HasMiddlewareTrait; |
| 10 | +use Exception; |
|
| 11 | +use ReflectionClass; |
|
| 13 | 12 | |
| 14 | 13 | /** |
| 15 | 14 | * Represent a route |