ExchangeOptions::setType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace AMQPAL\Options;
4
5
use AMQPAL\AbstractOptions;
6
use AMQPAL\Exception;
7
8
/**
9
 * Class ExchangeOptions
10
 *
11
 * @package AMQPAL\Options
12
 */
13
class ExchangeOptions extends AbstractOptions
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $name;
19
    /**
20
     * @var string
21
     */
22
    protected $type;
23
    /**
24
     * @var bool
25
     */
26
    protected $passive = false;
27
    /**
28
     * @var bool
29
     */
30
    protected $durable = true;
31
    /**
32
     * @var bool
33
     */
34
    protected $autoDelete = false;
35
    /**
36
     * @var bool
37
     */
38
    protected $internal = false;
39
    /**
40
     * @todo: probably useless
41
     * @var bool
42
     */
43
    protected $noWait = false;
44
    /**
45
     * @var array
46
     */
47
    protected $arguments = [];
48
49
    /**
50
     * @return string
51
     */
52 15
    public function getName()
53
    {
54 15
        return $this->name;
55
    }
56
57
    /**
58
     * @param string $name
59
     *
60
     * @return $this
61
     */
62 15
    public function setName($name)
63
    {
64 15
        $this->name = $name;
65
66 15
        return $this;
67
    }
68
69
    /**
70
     * @return string
71
     */
72 14
    public function getType()
73
    {
74 14
        return $this->type;
75
    }
76
77
    /**
78
     * @param string $type
79
     *
80
     * @return $this
81
     */
82 15
    public function setType($type)
83
    {
84 15
        $this->type = $type;
85
86 15
        return $this;
87
    }
88
89
    /**
90
     * @return bool
91
     */
92 14
    public function isPassive()
93
    {
94 14
        return $this->passive;
95
    }
96
97
    /**
98
     * @param bool $passive
99
     *
100
     * @return $this
101
     */
102 3
    public function setPassive($passive)
103
    {
104 3
        $this->passive = $passive;
105
106 3
        return $this;
107
    }
108
109
    /**
110
     * @return bool
111
     */
112 14
    public function isDurable()
113
    {
114 14
        return $this->durable;
115
    }
116
117
    /**
118
     * @param bool $durable
119
     *
120
     * @return $this
121
     */
122 3
    public function setDurable($durable)
123
    {
124 3
        $this->durable = $durable;
125
126 3
        return $this;
127
    }
128
129
    /**
130
     * @return bool
131
     */
132 14
    public function isAutoDelete()
133
    {
134 14
        return $this->autoDelete;
135
    }
136
137
    /**
138
     * @param bool $autoDelete
139
     *
140
     * @return $this
141
     */
142 3
    public function setAutoDelete($autoDelete)
143
    {
144 3
        $this->autoDelete = $autoDelete;
145
146 3
        return $this;
147
    }
148
149
    /**
150
     * @return bool
151
     */
152 14
    public function isInternal()
153
    {
154 14
        return $this->internal;
155
    }
156
157
    /**
158
     * @param bool $internal
159
     *
160
     * @return $this
161
     */
162 3
    public function setInternal($internal)
163
    {
164 3
        $this->internal = $internal;
165
166 3
        return $this;
167
    }
168
169
    /**
170
     * @return bool
171
     */
172 14
    public function isNoWait()
173
    {
174 14
        return $this->noWait;
175
    }
176
177
    /**
178
     * @param bool $noWait
179
     *
180
     * @return $this
181
     */
182 3
    public function setNoWait($noWait)
183
    {
184 3
        $this->noWait = $noWait;
185
186 3
        return $this;
187
    }
188
189
    /**
190
     * @return array
191
     */
192 14
    public function getArguments()
193
    {
194 14
        return $this->arguments;
195
    }
196
197
    /**
198
     * @param array $arguments
199
     *
200
     * @return $this
201
     */
202 3
    public function setArguments(array $arguments)
203
    {
204 3
        $this->arguments = $arguments;
205
206 3
        return $this;
207
    }
208
}
209