1 | <?php |
||
10 | class AppServiceProvider extends ServiceProvider |
||
11 | { |
||
12 | /** |
||
13 | * Bootstrap any application services. |
||
14 | * |
||
15 | * @return void |
||
16 | */ |
||
17 | public function boot() |
||
21 | |||
22 | /** |
||
23 | * Set locale for Carbon. |
||
24 | * |
||
25 | * @return bool |
||
26 | */ |
||
27 | protected function setLocaleForCarbon() |
||
31 | |||
32 | /** |
||
33 | * Register any application services. |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | public function register() |
||
43 | |||
44 | /** |
||
45 | * Get service providers to be registered. |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | protected function getServiceProviders() |
||
63 | |||
64 | /** |
||
65 | * Modify the current request. |
||
66 | * |
||
67 | * @return void |
||
68 | */ |
||
69 | protected function modifyCurrentRequest() |
||
79 | |||
80 | /** |
||
81 | * Determines appending JSON type to the "Accept" header for the current request. |
||
82 | * |
||
83 | * @param \Illuminate\Http\Request $request |
||
84 | * @return bool |
||
85 | */ |
||
86 | protected function shouldAddAcceptableJsonType(Request $request) |
||
90 | |||
91 | /** |
||
92 | * Indicates the current request is an API request, e.g. the request is sent |
||
93 | * from an API client. |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | protected function isApiRequest() |
||
101 | |||
102 | /** |
||
103 | * Determines making a fake API client for the current request. |
||
104 | * |
||
105 | * @return bool |
||
106 | */ |
||
107 | protected function shouldFakeAppClient() |
||
114 | |||
115 | /** |
||
116 | * Fake current agent client as an app client. |
||
117 | * |
||
118 | * @return void |
||
119 | */ |
||
120 | protected function fakeAppClient() |
||
128 | |||
129 | /** |
||
130 | * Get User-Agent string for fake app client. |
||
131 | * |
||
132 | * @return string |
||
133 | */ |
||
134 | protected function getUserAgentForFakeAppClient() |
||
144 | } |
||
145 |
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.