GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

DiscogsServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Jolita\LaravelDiscogs;
4
5
use Illuminate\Support\ServiceProvider;
6
use Jolita\DiscogsApi\DiscogsApi;
7
use GuzzleHttp\Client;
8
9
class DiscogsServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__.'/../config/laravel-discogs.php' => config_path('laravel-discogs.php'),
18
        ], 'config');
19
    }
20
21
    /**
22
     * Register the application services.
23
     */
24
    public function register()
25
    {
26
        $this->mergeConfigFrom(__DIR__.'/../config/laravel-discogs.php', 'laravel-discogs');
27
28
        $this->app->singleton('discogs', function () {
29
30
            $config = config('laravel-discogs');
31
32
            return new DiscogsApi(app(Client::class), $config['token'], $config['headers']['User-Agent']);
33
        });
34
35
    }
36
}
37