Jonathanm10 /
declutter
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace App\Providers; |
||||
| 4 | |||||
| 5 | use Illuminate\Support\Facades\Route; |
||||
| 6 | use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
||||
| 7 | |||||
| 8 | class RouteServiceProvider extends ServiceProvider |
||||
| 9 | { |
||||
| 10 | /** |
||||
| 11 | * This namespace is applied to your controller routes. |
||||
| 12 | * |
||||
| 13 | * In addition, it is set as the URL generator's root namespace. |
||||
| 14 | * |
||||
| 15 | * @var string |
||||
| 16 | */ |
||||
| 17 | protected $namespace = 'App\Http\Controllers'; |
||||
| 18 | |||||
| 19 | /** |
||||
| 20 | * Define your route model bindings, pattern filters, etc. |
||||
| 21 | * |
||||
| 22 | * @return void |
||||
| 23 | */ |
||||
| 24 | public function boot() |
||||
| 25 | { |
||||
| 26 | // |
||||
| 27 | |||||
| 28 | parent::boot(); |
||||
| 29 | } |
||||
| 30 | |||||
| 31 | /** |
||||
| 32 | * Define the routes for the application. |
||||
| 33 | * |
||||
| 34 | * @return void |
||||
| 35 | */ |
||||
| 36 | public function map() |
||||
| 37 | { |
||||
| 38 | $this->mapWebRoutes(); |
||||
| 39 | } |
||||
| 40 | |||||
| 41 | /** |
||||
| 42 | * Define the "web" routes for the application. |
||||
| 43 | * |
||||
| 44 | * These routes all receive session state, CSRF protection, etc. |
||||
| 45 | * |
||||
| 46 | * @return void |
||||
| 47 | */ |
||||
| 48 | protected function mapWebRoutes() |
||||
| 49 | { |
||||
| 50 | Route::middleware('web') |
||||
|
0 ignored issues
–
show
|
|||||
| 51 | ->namespace($this->namespace) |
||||
| 52 | ->group(base_path('routes/web.php')); |
||||
|
0 ignored issues
–
show
base_path('routes/web.php') of type string is incompatible with the type array expected by parameter $attributes of Illuminate\Support\Facades\Route::group().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 53 | } |
||||
| 54 | } |
||||
| 55 |
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.