Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Branch master (dfc5d1)
by Denis
01:12
created

CentrifugeServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 6
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 12 1
1
<?php
2
3
namespace denis660\Centrifuge;
4
5
use GuzzleHttp\Client as HttpClient;
6
use Illuminate\Broadcasting\BroadcastManager;
7
use Illuminate\Support\ServiceProvider;
8
9
class CentrifugeServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Add centrifugo broadcaster.
13
     *
14
     * @param \Illuminate\Broadcasting\BroadcastManager $broadcastManager
15
     */
16
    public function boot(BroadcastManager $broadcastManager)
17
    {
18
        $broadcastManager->extend('centrifugo', function ($app) {
19
            return new CentrifugeBroadcaster($app->make('centrifugo'));
20
        });
21
    }
22
23
    /**
24
     * Register the service provider.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        $this->app->singleton('centrifugo', function ($app) {
31
            $config = $app->make('config')->get('broadcasting.connections.centrifugo');
32
            $http = new HttpClient();
33
34
            return new Centrifuge($config, $http);
35
        });
36
37
        $this->app->alias('centrifugo', 'denis660\Centrifuge\Centrifuge');
38
        $this->app->alias('centrifugo', 'denis660\Centrifuge\Contracts\Centrifugo');
39
    }
40
}
41