Passed
Push — master ( 605a7f...c53e78 )
by Marcel
14:27 queued 03:25
created

PrivateChannel   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A subscribe() 0 5 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
     *
16
     * @param  \Ratchet\ConnectionInterface  $connection
17
     * @param  \stdClass  $payload
18
     * @return bool
19
     *
20
     * @throws InvalidSignature
21
     */
22
    public function subscribe(ConnectionInterface $connection, stdClass $payload): bool
23
    {
24
        $this->verifySignature($connection, $payload);
25
26
        return parent::subscribe($connection, $payload);
27
    }
28
}
29