Completed
Push — master ( 684883...0d5cb2 )
by Frederik
06:17 queued 04:16
created

Address   B

Complexity

Total Complexity 19

Size/Duplication

Total Lines 249
Duplicated Lines 0 %

Coupling/Cohesion

Components 9
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 19
c 2
b 0
f 1
lcom 9
cbo 0
dl 0
loc 249
ccs 12
cts 16
cp 0.75
rs 7.1428

19 Methods

Rating   Name   Duplication   Size   Complexity  
A getCountry() 0 4 1
A setCountry() 0 7 1
A getCountrySubDivision() 0 4 1
A setCountrySubDivision() 0 7 1
A getAddressLines() 0 4 1
A setAddressLines() 0 7 1
A addAddressLine() 0 7 1
A getDepartment() 0 4 1
A setDepartment() 0 7 1
A getSubDepartment() 0 4 1
A setSubDepartment() 0 7 1
A getStreetName() 0 4 1
A setStreetName() 0 7 1
A getBuildingNumber() 0 4 1
A setBuildingNumber() 0 7 1
A getPostCode() 0 4 1
A setPostCode() 0 7 1
A getTownName() 0 4 1
A setTownName() 0 7 1
1
<?php
2
3
namespace Genkgo\Camt\DTO;
4
5
/**
6
 * Class Address
7
 * @package Genkgo\Camt\DTO
8
 */
9
class Address
10
{
11
    /**
12
     * @var string|null
13
     */
14
    private $country;
15
16
    /**
17
     * @var string|null
18
     */
19
    private $countrySubDivision;
20
21
    /**
22
     * @var array
23 2
     */
24
    private $addressLines = [];
25 2
26
    /**
27
     * @var string|null
28
     */
29
    private $department;
30
31
    /**
32 11
     * @var string|null
33
     */
34 11
    private $subDepartment;
35 11
36 11
    /**
37
     * @var string|null
38
     */
39
    private $streetName;
40
41
    /**
42 1
     * @var string|null
43
     */
44 1
    private $buildingNumber;
45
46
    /**
47
     * @var string|null
48
     */
49
    private $postCode;
50
51
    /**
52
     * @var string|null
53
     */
54
    private $townName;
55
56
    /**
57
     * @return string|null
58
     */
59
    public function getCountry()
60
    {
61
        return $this->country;
62 1
    }
63
64 1
    /**
65 1
     * @param  string $country
66 1
     *
67
     * @return static
68
     */
69
    public function setCountry($country)
70
    {
71
        $cloned = clone $this;
72
        $cloned->country = $country;
73
74
        return $cloned;
75
    }
76
77
    /**
78
     * @return string|null
79
     */
80
    public function getCountrySubDivision()
81
    {
82
        return $this->countrySubDivision;
83
    }
84
85
    /**
86
     * @param  string $countrySubDivision
87
     *
88
     * @return static
89
     */
90
    public function setCountrySubDivision($countrySubDivision)
91
    {
92
        $cloned = clone $this;
93
        $cloned->countrySubDivision = $countrySubDivision;
94
95
        return $cloned;
96
    }
97
98
    /**
99
     * @return array
100
     */
101
    public function getAddressLines()
102
    {
103
        return $this->addressLines;
104
    }
105
106
    /**
107
     * @param  array $addressLines
108
     *
109
     * @return static
110
     */
111
    public function setAddressLines(array $addressLines)
112
    {
113
        $cloned = clone $this;
114
        $cloned->addressLines = $addressLines;
115
116
        return $cloned;
117
    }
118
119
    /**
120
     * @param  string $addressLine
121
     *
122
     * @return static
123
     */
124
    public function addAddressLine($addressLine)
125
    {
126
        $cloned = clone $this;
127
        $cloned->addressLines[] = $addressLine;
128
129
        return $cloned;
130
    }
131
132
    /**
133
     * @return string|null
134
     */
135
    public function getDepartment()
136
    {
137
        return $this->department;
138
    }
139
140
    /**
141
     * @param  string $department
142
     *
143
     * @return static
144
     */
145
    public function setDepartment($department)
146
    {
147
        $cloned = clone $this;
148
        $cloned->department = $department;
149
150
        return $cloned;
151
    }
152
153
    /**
154
     * @return string|null
155
     */
156
    public function getSubDepartment()
157
    {
158
        return $this->subDepartment;
159
    }
160
161
    /**
162
     * @param  string $subDepartment
163
     *
164
     * @return static
165
     */
166
    public function setSubDepartment($subDepartment)
167
    {
168
        $cloned = clone $this;
169
        $cloned->subDepartment = $subDepartment;
170
171
        return $cloned;
172
    }
173
174
    /**
175
     * @return string|null
176
     */
177
    public function getStreetName()
178
    {
179
        return $this->streetName;
180
    }
181
182
    /**
183
     * @param  string $streetName
184
     *
185
     * @return static
186
     */
187
    public function setStreetName($streetName)
188
    {
189
        $cloned = clone $this;
190
        $cloned->streetName = $streetName;
191
192
        return $cloned;
193
    }
194
195
    /**
196
     * @return string|null
197
     */
198
    public function getBuildingNumber()
199
    {
200
        return $this->buildingNumber;
201
    }
202
203
    /**
204
     * @param  string $buildingNumber
205
     *
206
     * @return static
207
     */
208
    public function setBuildingNumber($buildingNumber)
209
    {
210
        $cloned = clone $this;
211
        $cloned->buildingNumber = $buildingNumber;
212
213
        return $cloned;
214
    }
215
216
    /**
217
     * @return string|null
218
     */
219
    public function getPostCode()
220
    {
221
        return $this->postCode;
222
    }
223
224
    /**
225
     * @param  string $postCode
226
     *
227
     * @return static
228
     */
229
    public function setPostCode($postCode)
230
    {
231
        $cloned = clone $this;
232
        $cloned->postCode = $postCode;
233
234
        return $cloned;
235
    }
236
237
    /**
238
     * @return string|null
239
     */
240
    public function getTownName()
241
    {
242
        return $this->townName;
243
    }
244
245
    /**
246
     * @param  string $townName
247
     *
248
     * @return static
249
     */
250
    public function setTownName($townName)
251
    {
252
        $cloned = clone $this;
253
        $cloned->townName = $townName;
254
255
        return $cloned;
256
    }
257
}
258