Completed
Push — master ( dd33b3...946b97 )
by Lyal
19:36 queued 17:10
created

CheckrServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Lyal\Checkr\Laravel;
4
5
use GuzzleHttp\Client as Guzzle;
6
use Illuminate\Support\ServiceProvider;
7
use Lyal\Checkr\Client;
8
use PullRequest\Checkr\Http\Middleware\Webhook;
0 ignored issues
show
Bug introduced by
The type PullRequest\Checkr\Http\Middleware\Webhook was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
11
class CheckrServiceProvider extends ServiceProvider
12
{
13
14
    public function boot()
15
    {
16
        $this->loadRoutesFrom(__DIR__ . '/Routes/api.php');
17
    }
18
19
    public function register()
20
    {
21
        $this->app['router']->aliasMiddleware('checkr_webhook', Webhook::class);
22
        $this->app->bind('lyalt.checkr', function () {
23
            return new Client(new Guzzle);
0 ignored issues
show
Bug introduced by
new GuzzleHttp\Client() of type GuzzleHttp\Client is incompatible with the type null|string expected by parameter $key of Lyal\Checkr\Client::__construct(). ( Ignorable by Annotation )

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

23
            return new Client(/** @scrutinizer ignore-type */ new Guzzle);
Loading history...
24
        });
25
    }
26
27
    /**
28
     * Get the services provided by the provider.
29
     *
30
     * @return array
31
     */
32
    public function provides()
33
    {
34
        return [Client::class];
35
    }
36
}