Completed
Push — Framework-Dependencies-Upgrade ( 998813...01c962 )
by Sheela
07:38
created

BroadcastServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
ccs 7
cts 8
cp 0.875
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 11 1
1
<?php
2
3
namespace SET\Providers;
4
5
use Illuminate\Support\Facades\Broadcast;
6
use Illuminate\Support\ServiceProvider;
7
8
class BroadcastServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap any application services.
12
     *
13
     * @return void
14
     */
15 186
    public function boot()
16
    {
17 186
        Broadcast::routes();
18
19
        /*
20
         * Authenticate the user's personal channel...
21
         */
22 186
        Broadcast::channel('App.User.*', function ($user, $userId) {
23
            return (int) $user->id === (int) $userId;
24 186
        });
25 186
    }
26
27 186
    public function register()
28
    {
29 186
    }
30
}
31