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

PrivateChannel::subscribe()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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