DnsRecord   A
last analyzed

Complexity

Total Complexity 27

Size/Duplication

Total Lines 262
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 27
dl 0
loc 262
rs 10
c 0
b 0
f 0
ccs 66
cts 66
cp 1

26 Methods

Rating   Name   Duplication   Size   Complexity  
A setProxiable() 0 3 1
A setId() 0 3 1
A getModifiedOn() 0 3 1
A setLocked() 0 3 1
A getTtl() 0 3 1
A setModifiedOn() 0 3 1
A getData() 0 3 1
A setContent() 0 3 1
A getContent() 0 3 1
A getCreatedOn() 0 3 1
A getName() 0 3 1
A getZoneId() 0 3 1
A setData() 0 6 2
A setCreatedOn() 0 3 1
A setType() 0 3 1
A setZoneId() 0 3 1
A setTtl() 0 3 1
A isLocked() 0 3 1
A setZoneName() 0 3 1
A isProxiable() 0 3 1
A getType() 0 3 1
A isProxied() 0 3 1
A getId() 0 3 1
A setProxied() 0 3 1
A setName() 0 3 1
A getZoneName() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
/**
4
 *
5
 * Copyright (C) 2018  Ross Mitchell
6
 *
7
 * This file is part of RossMitchell/UpdateCloudFlare.
8
 *
9
 * RossMitchell/UpdateCloudFlare is free software: you can redistribute
10
 * it and/or modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation, either version 3 of the
12
 * License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
 */
22
23
namespace RossMitchell\UpdateCloudFlare\Responses\Results;
24
25
/**
26
 * Class DnsRecord
27
 * @package RossMitchell\UpdateCloudFlare\Responses\Results
28
 */
29
class DnsRecord
30
{
31
32
    /**
33
     * @var string
34
     */
35
    private $id;
36
    /**
37
     * @var string
38
     */
39
    private $type;
40
    /**
41
     * @var string
42
     */
43
    private $name;
44
    /**
45
     * @var string
46
     */
47
    private $content;
48
    /**
49
     * @var bool
50
     */
51
    private $proxiable;
52
    /**
53
     * @var bool
54
     */
55
    private $proxied;
56
    /**
57
     * @var int
58
     */
59
    private $ttl;
60
    /**
61
     * @var bool
62
     */
63
    private $locked;
64
    /**
65
     * @var string
66
     */
67
    private $zoneId;
68
    /**
69
     * @var string
70
     */
71
    private $zoneName;
72
    /**
73
     * @var string
74
     */
75
    private $createdOn;
76
    /**
77
     * @var string
78
     */
79
    private $modifiedOn;
80
    private $data;
81
82
    /**
83
     * @return string
84
     */
85 3
    public function getId(): string
86
    {
87 3
        return $this->id;
88
    }
89
90
    /**
91
     * @param string $id
92
     */
93 46
    public function setId(string $id): void
94
    {
95 46
        $this->id = $id;
96 46
    }
97
98
    /**
99
     * @return string
100
     */
101 1
    public function getType(): string
102
    {
103 1
        return $this->type;
104
    }
105
106
    /**
107
     * @param string $type
108
     */
109 45
    public function setType(string $type): void
110
    {
111 45
        $this->type = $type;
112 45
    }
113
114
    /**
115
     * @return string
116
     */
117 1
    public function getName(): string
118
    {
119 1
        return $this->name;
120
    }
121
122
    /**
123
     * @param string $name
124
     */
125 44
    public function setName(string $name): void
126
    {
127 44
        $this->name = $name;
128 44
    }
129
130
    /**
131
     * @return string
132
     */
133 6
    public function getContent(): string
134
    {
135 6
        return $this->content;
136
    }
137
138
    /**
139
     * @param string $content
140
     */
141 43
    public function setContent(string $content): void
142
    {
143 43
        $this->content = $content;
144 43
    }
145
146
    /**
147
     * @return bool
148
     */
149 1
    public function isProxiable(): bool
150
    {
151 1
        return $this->proxiable;
152
    }
153
154
    /**
155
     * @param bool $proxiable
156
     */
157 42
    public function setProxiable(bool $proxiable): void
158
    {
159 42
        $this->proxiable = $proxiable;
160 42
    }
161
162
    /**
163
     * @return bool
164
     */
165 1
    public function isProxied(): bool
166
    {
167 1
        return $this->proxied;
168
    }
169
170
    /**
171
     * @param bool $proxied
172
     */
173 41
    public function setProxied(bool $proxied): void
174
    {
175 41
        $this->proxied = $proxied;
176 41
    }
177
178
    /**
179
     * @return int
180
     */
181 1
    public function getTtl(): int
182
    {
183 1
        return $this->ttl;
184
    }
185
186
    /**
187
     * @param int $ttl
188
     */
189 40
    public function setTtl(int $ttl): void
190
    {
191 40
        $this->ttl = $ttl;
192 40
    }
193
194
    /**
195
     * @return bool
196
     */
197 1
    public function isLocked(): bool
198
    {
199 1
        return $this->locked;
200
    }
201
202
    /**
203
     * @param bool $locked
204
     */
205 39
    public function setLocked(bool $locked): void
206
    {
207 39
        $this->locked = $locked;
208 39
    }
209
210
    /**
211
     * @return string
212
     */
213 1
    public function getZoneId(): string
214
    {
215 1
        return $this->zoneId;
216
    }
217
218
    /**
219
     * @param string $zoneId
220
     */
221 38
    public function setZoneId(string $zoneId): void
222
    {
223 38
        $this->zoneId = $zoneId;
224 38
    }
225
226
    /**
227
     * @return string
228
     */
229 1
    public function getZoneName(): string
230
    {
231 1
        return $this->zoneName;
232
    }
233
234
    /**
235
     * @param string $zoneName
236
     */
237 37
    public function setZoneName(string $zoneName): void
238
    {
239 37
        $this->zoneName = $zoneName;
240 37
    }
241
242
    /**
243
     * @return string
244
     */
245 1
    public function getCreatedOn(): string
246
    {
247 1
        return $this->createdOn;
248
    }
249
250
    /**
251
     * @param string $createdOn
252
     */
253 36
    public function setCreatedOn(string $createdOn): void
254
    {
255 36
        $this->createdOn = $createdOn;
256 36
    }
257
258
    /**
259
     * @return string
260
     */
261 1
    public function getModifiedOn(): string
262
    {
263 1
        return $this->modifiedOn;
264
    }
265
266
    /**
267
     * @param string $modifiedOn
268
     */
269 35
    public function setModifiedOn(string $modifiedOn): void
270
    {
271 35
        $this->modifiedOn = $modifiedOn;
272 35
    }
273
274
    /**
275
     * @return mixed
276
     */
277 1
    public function getData()
278
    {
279 1
        return $this->data;
280
    }
281
282
    /**
283
     * @param mixed $data
284
     */
285 34
    public function setData($data): void
286
    {
287 34
        if (\json_encode($data) === '{}') {
288 34
            $data = null;
289
        }
290 34
        $this->data = $data;
291 34
    }
292
}
293