TCAssigned   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTopic() 0 3 1
A getChannel() 0 3 1
A setTopic() 0 4 1
A setChannel() 0 4 1
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