AbstractRule   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 54
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getQueueName() 0 3 1
A getVHostName() 0 3 1
A setQueueName() 0 3 1
A setVHostName() 0 3 1
1
<?php
2
namespace pmill\RabbitRabbit;
3
4
abstract class AbstractRule implements RuleInterface
5
{
6
    /**
7
     * @var string
8
     */
9
    protected $vHostName;
10
11
    /**
12
     * @var string
13
     */
14
    protected $queueName;
15
16
    /**
17
     * AbstractRule constructor.
18
     *
19
     * @param string $vHostName
20
     * @param string $queueName
21
     */
22
    public function __construct(string $vHostName, string $queueName)
23
    {
24
        $this->vHostName = $vHostName;
25
        $this->queueName = $queueName;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getVHostName(): string
32
    {
33
        return $this->vHostName;
34
    }
35
36
    /**
37
     * @param string $vHostName
38
     */
39
    public function setVHostName(string $vHostName): void
40
    {
41
        $this->vHostName = $vHostName;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getQueueName(): string
48
    {
49
        return $this->queueName;
50
    }
51
52
    /**
53
     * @param string $queueName
54
     */
55
    public function setQueueName(string $queueName): void
56
    {
57
        $this->queueName = $queueName;
58
    }
59
}
60