Completed
Pull Request — master (#447)
by Alexandru
01:47
created

PrivateChannel   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A subscribe() 0 6 1
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\Channels;
4
5
use BeyondCode\LaravelWebSockets\Server\Exceptions\InvalidSignature;
6
use Ratchet\ConnectionInterface;
7
use stdClass;
8
9
class PrivateChannel extends Channel
10
{
11
    /**
12
     * Subscribe to the channel.
13
     *
14
     * @see    https://pusher.com/docs/pusher_protocol#presence-channel-events
15
     * @param  \Ratchet\ConnectionInterface  $connection
16
     * @param  \stdClass  $payload
17
     * @return void
18
     * @throws InvalidSignature
19
     */
20
    public function subscribe(ConnectionInterface $connection, stdClass $payload)
21
    {
22
        $this->verifySignature($connection, $payload);
23
24
        parent::subscribe($connection, $payload);
25
    }
26
}
27