ChannelUnhold::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 6
loc 6
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * Created by Piskle.
4
 * Date: 8/22/16
5
 * Time: 3:02 PM
6
 */
7
8
namespace phparia\Events;
9
10
use phparia\Client\AriClient;
11
use phparia\Resources\Channel;
12
13 View Code Duplication
class ChannelUnhold extends Event implements IdentifiableEventInterface
14
{
15
    /**
16
     * @var Channel
17
     */
18
    private $channel;
19
20
    /**
21
     * @return Channel
22
     */
23
    public function getChannel()
24
    {
25
        return $this->channel;
26
    }
27
28
    public function getEventId()
29
    {
30
        return "{$this->getType()}_{$this->getChannel()->getId()}";
31
    }
32
33
    /**
34
     * @param AriClient $client
35
     * @param string $response
36
     */
37
    public function __construct(AriClient $client, $response)
38
    {
39
        parent::__construct($client, $response);
40
41
        $this->channel = $this->getResponseValue('channel', 'phparia\Resources\Channel', $client);
42
    }
43
}