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.

ServiceProvider::provides()   A
last analyzed

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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * This file is part of the mucts.com.
4
 *
5
 * This source file is subject to the MIT license that is bundled
6
 * with this source code in the file LICENSE.
7
 *
8
 * @version 1.0
9
 * @author herry<[email protected]>
10
 * @copyright © 2020  MuCTS.com All Rights Reserved.
11
 */
12
13
namespace MuCTS\Laravel\AMQP\Providers;
14
15
use Illuminate\Contracts\Support\DeferrableProvider;
16
use Illuminate\Support\ServiceProvider as Provider;
17
use MuCTS\Laravel\AMQP\AMQPManager;
18
19
class ServiceProvider extends Provider implements DeferrableProvider
20
{
21
    public function register()
22
    {
23
        $this->mergeConfigFrom(
24
            dirname(__DIR__) . '/../config/amqp.php', 'amqp'
25
        );
26
        $this->app->singleton(AMQPManager::class, function ($app) {
27
            return new AMQPManager($app);
28
        });
29
        $this->app->alias(AMQPManager::class, 'amqp');
30
    }
31
32
    public function boot()
33
    {
34
        if (!file_exists(config_path('amqp.php'))) {
35
            $this->publishes([
36
                dirname(__DIR__) . '/../config/amqp.php' => config_path('amqp.php'),
37
            ], 'config');
38
        }
39
    }
40
41
    public function provides()
42
    {
43
        return [AMQPManager::class, 'amqp'];
44
    }
45
}