TCAssigned::setChannel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Topic+Channel assign
4
 * User: moyo
5
 * Date: 15/11/2017
6
 * Time: 4:05 PM
7
 */
8
9
namespace Carno\NSQ\Chips;
10
11
trait TCAssigned
12
{
13
    /**
14
     * @var string
15
     */
16
    private $topic = 'default';
17
18
    /**
19
     * @var string
20
     */
21
    private $channel = 'default';
22
23
    /**
24
     * @param string $topic
25
     * @return static
26
     */
27
    public function setTopic(string $topic) : self
28
    {
29
        $this->topic = $topic;
30
        return $this;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getTopic() : string
37
    {
38
        return $this->topic;
39
    }
40
41
    /**
42
     * @param string $chanel
43
     * @return static
44
     */
45
    public function setChannel(string $chanel) : self
46
    {
47
        $this->channel = $chanel;
48
        return $this;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getChannel() : string
55
    {
56
        return $this->channel;
57
    }
58
}
59