1 | <?php |
||
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() |
||
30 | |||
31 | /** |
||
32 | * Define the routes for the application. |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | public function map() |
||
44 | |||
45 | /** |
||
46 | * Define the "web" routes for the application. |
||
47 | * |
||
48 | * These routes all receive session state, CSRF protection, etc. |
||
49 | * |
||
50 | * @return void |
||
51 | */ |
||
52 | protected function mapWebRoutes() |
||
61 | |||
62 | /** |
||
63 | * Define the "api" routes for the application. |
||
64 | * |
||
65 | * These routes are typically stateless. |
||
66 | * |
||
67 | * @return void |
||
68 | */ |
||
69 | protected function mapApiRoutes() |
||
78 | } |
||
79 |
This check compares calls to functions or methods with their respective definitions. If the call has more 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.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.