Address::setCity()   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
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace WSW\SiftScience\Entities;
4
5
use WSW\SiftScience\Support\Formatter;
6
7
/**
8
 * Class Address
9
 *
10
 * @package WSW\SiftScience\Entities
11
 * @author Ronaldo Matos Rodrigues <[email protected]>
12
 */
13
class Address
14
{
15
    /**
16
     * @var string
17
     */
18
    private $name;
19
20
    /**
21
     * @var string
22
     */
23
    private $phone;
24
25
    /**
26
     * @var string
27
     */
28
    private $address1;
29
30
    /**
31
     * @var string
32
     */
33
    private $address2;
34
35
    /**
36
     * @var string
37
     */
38
    private $city;
39
40
    /**
41
     * @var string
42
     */
43
    private $region;
44
45
    /**
46
     * @var string
47
     */
48
    private $country;
49
50
    /**
51
     * @var string
52
     */
53
    private $zipcode;
54
55
    /**
56
     * @return string
57
     */
58 2
    public function getName()
59
    {
60 2
        return $this->name;
61
    }
62
63
    /**
64
     * @param string $name
65
     *
66
     * @return $this
67
     */
68 5
    public function setName($name)
69
    {
70 5
        $this->name = $name;
71
72 5
        return $this;
73
    }
74
75
    /**
76
     * @return string
77
     */
78 2
    public function getPhone()
79
    {
80 2
        return $this->phone;
81
    }
82
83
    /**
84
     * @param string $phone
85
     *
86
     * @return $this
87
     */
88 5
    public function setPhone($phone)
89
    {
90 5
        $this->phone = Formatter::phone($phone);
91
92 5
        return $this;
93
    }
94
95
    /**
96
     * @return string
97
     */
98 2
    public function getAddress1()
99
    {
100 2
        return $this->address1;
101
    }
102
103
    /**
104
     * @param string $address1
105
     *
106
     * @return $this
107
     */
108 5
    public function setAddress1($address1)
109
    {
110 5
        $this->address1 = $address1;
111
112 5
        return $this;
113
    }
114
115
    /**
116
     * @return string
117
     */
118 2
    public function getAddress2()
119
    {
120 2
        return $this->address2;
121
    }
122
123
    /**
124
     * @param string $address2
125
     *
126
     * @return $this
127
     */
128 5
    public function setAddress2($address2)
129
    {
130 5
        $this->address2 = $address2;
131
132 5
        return $this;
133
    }
134
135
    /**
136
     * @return string
137
     */
138 2
    public function getCity()
139
    {
140 2
        return $this->city;
141
    }
142
143
    /**
144
     * @param string $city
145
     *
146
     * @return $this
147
     */
148 5
    public function setCity($city)
149
    {
150 5
        $this->city = $city;
151
152 5
        return $this;
153
    }
154
155
    /**
156
     * @return string
157
     */
158 2
    public function getRegion()
159
    {
160 2
        return $this->region;
161
    }
162
163
    /**
164
     * @param string $region
165
     *
166
     * @return $this
167
     */
168 5
    public function setRegion($region)
169
    {
170 5
        $this->region = $region;
171
172 5
        return $this;
173
    }
174
175
    /**
176
     * @return string
177
     */
178 2
    public function getCountry()
179
    {
180 2
        return $this->country;
181
    }
182
183
    /**
184
     * @param string $country
185
     *
186
     * @return $this
187
     */
188 5
    public function setCountry($country)
189
    {
190 5
        $this->country = $country;
191
192 5
        return $this;
193
    }
194
195
    /**
196
     * @return string
197
     */
198 2
    public function getZipcode()
199
    {
200 2
        return $this->zipcode;
201
    }
202
203
    /**
204
     * @param string $zipcode
205
     *
206
     * @return $this
207
     */
208 5
    public function setZipcode($zipcode)
209
    {
210 5
        $this->zipcode = $zipcode;
211
212 5
        return $this;
213
    }
214
}
215