1 | <?php |
||||
2 | |||||
3 | namespace NotificationChannels\SmsRu; |
||||
4 | |||||
5 | use Illuminate\Support\ServiceProvider; |
||||
6 | |||||
7 | class SmsRuServiceProvider extends ServiceProvider |
||||
8 | { |
||||
9 | /** |
||||
10 | * Register the application services. |
||||
11 | */ |
||||
12 | public function register() |
||||
13 | { |
||||
14 | $this->app->singleton(SmsRuApi::class, function ($app) { |
||||
0 ignored issues
–
show
|
|||||
15 | $apiId = $this->app['config']['services.sms_ru.api_id']; |
||||
16 | $client = new SmsRuApi(new \Zelenin\SmsRu\Auth\ApiIdAuth($apiId)); |
||||
0 ignored issues
–
show
The call to
NotificationChannels\SmsRu\SmsRuApi::__construct() has too few arguments starting with client .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
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. ![]() |
|||||
17 | |||||
18 | return $client; |
||||
19 | }); |
||||
20 | } |
||||
21 | |||||
22 | public function provides(): array |
||||
23 | { |
||||
24 | return [ |
||||
25 | SmsRuApi::class, |
||||
26 | ]; |
||||
27 | } |
||||
28 | } |
||||
29 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.