PushesToPusher   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPusherBroadcaster() 0 8 1
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\Concerns;
4
5
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
6
use Pusher\Pusher;
7
8
trait PushesToPusher
9
{
10
    /**
11
     * Get the right Pusher broadcaster for the used driver.
12
     *
13
     * @param  array  $app
14
     * @return \Illuminate\Broadcasting\Broadcasters\Broadcaster
15
     */
16
    public function getPusherBroadcaster(array $app)
17
    {
18
        return new PusherBroadcaster(
19
            new Pusher(
20
                $app['key'],
21
                $app['secret'],
22
                $app['id'],
23
                config('broadcasting.connections.pusher.options', [])
24
            )
25
        );
26
    }
27
}
28