Skip to content

Commit

Permalink
[5.6] Update Route Facade docblocks to support all scenarios (#24086)
Browse files Browse the repository at this point in the history
  • Loading branch information
Korri authored and taylorotwell committed May 2, 2018
1 parent 2757e72 commit ba7a8d8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
15 changes: 15 additions & 0 deletions src/Illuminate/Routing/RouteRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@
use Illuminate\Support\Arr;
use InvalidArgumentException;

/**
* @method \Illuminate\Routing\Route get(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route post(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route put(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route delete(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route patch(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route options(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route any(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\RouteRegistrar as(string $value)
* @method \Illuminate\Routing\RouteRegistrar domain(string $value)
* @method \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware)
* @method \Illuminate\Routing\RouteRegistrar name(string $value)
* @method \Illuminate\Routing\RouteRegistrar namespace(string $value)
* @method \Illuminate\Routing\RouteRegistrar prefix(string $prefix)
*/
class RouteRegistrar
{
/**
Expand Down
39 changes: 21 additions & 18 deletions src/Illuminate/Support/Facades/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,31 @@
namespace Illuminate\Support\Facades;

/**
* @method static \Illuminate\Support\Facades\Route get(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route post(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route put(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route delete(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route patch(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route options(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route any(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route match(array|string $methods, string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Support\Facades\Route prefix(string $prefix)
* @method static \Illuminate\Routing\Route get(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\Route post(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\Route put(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\Route delete(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\Route patch(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\Route options(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\Route any(string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\Route match(array|string $methods, string $uri, \Closure|array|string|null $action = null)
* @method static \Illuminate\Routing\RouteRegistrar prefix(string $prefix)
* @method static \Illuminate\Routing\PendingResourceRegistration resource(string $name, string $controller, array $options = [])
* @method static \Illuminate\Routing\PendingResourceRegistration apiResource(string $name, string $controller, array $options = [])
* @method static \Illuminate\Support\Facades\Route middleware(array|string|null $middleware)
* @method static \Illuminate\Support\Facades\Route substituteBindings(\Illuminate\Support\Facades\Route $route)
* @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware)
* @method static \Illuminate\Routing\Route substituteBindings(\Illuminate\Support\Facades\Route $route)
* @method static void substituteImplicitBindings(\Illuminate\Support\Facades\Route $route)
* @method static \Illuminate\Support\Facades\Route as(string $value)
* @method static \Illuminate\Support\Facades\Route domain(string $value)
* @method static \Illuminate\Support\Facades\Route name(string $value)
* @method static \Illuminate\Support\Facades\Route namespace(string $value)
* @method static \Illuminate\Support\Facades\Route where(array|string $name, string $expression = null)
* @method static \Illuminate\Routing\RouteRegistrar as(string $value)
* @method static \Illuminate\Routing\RouteRegistrar domain(string $value)
* @method static \Illuminate\Routing\RouteRegistrar name(string $value)
* @method static \Illuminate\Routing\RouteRegistrar namespace(string $value)
* @method static \Illuminate\Routing\Router group(array $attributes, \Closure|string $routes)
* @method static \Illuminate\Support\Facades\Route redirect(string $uri, string $destination, int $status = 301)
* @method static \Illuminate\Support\Facades\Route view(string $uri, string $view, array $data = [])
* @method static \Illuminate\Routing\Route redirect(string $uri, string $destination, int $status = 301)
* @method static \Illuminate\Routing\Route view(string $uri, string $view, array $data = [])
* @method static void bind(string $key, string|callable $binder)
* @method static \Illuminate\Routing\Route current()
* @method static string|null currentRouteName()
* @method static string|null currentRouteAction()
*
* @see \Illuminate\Routing\Router
*/
Expand Down

0 comments on commit ba7a8d8

Please sign in to comment.