Issues (1)

src/InterfaxServiceProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace NotificationChannels\Interfax;
4
5
use Illuminate\Support\ServiceProvider;
6
use Interfax\Client;
7
8
class InterfaxServiceProvider extends ServiceProvider
9
{
10 18
    public function boot()
11
    {
12 18
        $this->app->when(InterfaxChannel::class)
0 ignored issues
show
The method when() does not exist on Tests\Laravel\App. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

12
        $this->app->/** @scrutinizer ignore-call */ 
13
                    when(InterfaxChannel::class)

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
13 18
            ->needs(Client::class)
14 18
            ->give(function () {
15
                $options = [
16
                    'username' => config('services.interfax.username'),
17
                    'password' => config('services.interfax.password'),
18
                ];
19
20
                if (config('services.interfax.pci')) {
21
                    $options['base_uri'] = 'https://rest-sl.interfax.net';
22
                }
23
24
                return new Client($options);
25
            });
26
    }
27
}
28