PushSettings::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 7
cts 7
cp 1
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
namespace PSB\Core\Transport;
3
4
5
use PSB\Core\Util\Guard;
6
7
class PushSettings
8
{
9
    /**
10
     * @var string
11
     */
12
    private $inputQueue;
13
14
    /**
15
     * @var string
16
     */
17
    private $errorQueue;
18
19
    /**
20
     * @var bool
21
     */
22
    private $purgeOnStartup;
23
24
    /**
25
     * @param string $inputQueue
26
     * @param string $errorQueue
27
     * @param bool   $purgeOnStartup
28
     */
29 6
    public function __construct($inputQueue, $errorQueue, $purgeOnStartup)
30
    {
31 6
        Guard::againstNullAndEmpty('inputQueue', $inputQueue);
32 5
        Guard::againstNullAndEmpty('errorQueue', $errorQueue);
33
34 4
        $this->inputQueue = $inputQueue;
35 4
        $this->errorQueue = $errorQueue;
36 4
        $this->purgeOnStartup = $purgeOnStartup;
37 4
    }
38
39
    /**
40
     * @return string
41
     */
42 1
    public function getInputQueue()
43
    {
44 1
        return $this->inputQueue;
45
    }
46
47
    /**
48
     * @return string
49
     */
50 1
    public function getErrorQueue()
51
    {
52 1
        return $this->errorQueue;
53
    }
54
55
    /**
56
     * @return boolean
57
     */
58 1
    public function isPurgeOnStartup()
59
    {
60 1
        return $this->purgeOnStartup;
61
    }
62
}
63