Completed
Pull Request — master (#41)
by Leszek
04:36
created

Address::setLastName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace WMDE\Fundraising\Entities;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @since 2.0
9
 *
10
 * @ORM\Table( name="address" )
11
 * @ORM\Entity
12
 */
13
class Address {
14
15
	/**
16
	 * @var string
17
	 *
18
	 * @ORM\Column(name="salutation", type="string", length=16, nullable=true)
19
	 */
20
	private $salutation;
21
22
	/**
23
	 * @var string
24
	 *
25
	 * @ORM\Column(name="company", type="string", length=100, nullable=true)
26
	 */
27
	private $company;
28
29
	/**
30
	 * @var string
31
	 *
32
	 * @ORM\Column(name="title", type="string", length=16, nullable=true)
33
	 */
34
	private $title;
35
36
	/**
37
	 * @var string
38
	 *
39
	 * @ORM\Column(name="first_name", type="string", length=50, options={"default":""}, nullable=false)
40
	 */
41
	private $firstName = '';
42
43
	/**
44
	 * @var string
45
	 *
46
	 * @ORM\Column(name="last_name", type="string", length=50, options={"default":""}, nullable=false)
47
	 */
48
	private $lastName = '';
49
50
	/**
51
	 * @var string
52
	 *
53
	 * @ORM\Column(name="street", type="string", length=100, nullable=true)
54
	 */
55
	private $address;
56
57
	/**
58
	 * @var string
59
	 *
60
	 * @ORM\Column(name="postcode", type="string", length=8, nullable=true)
61
	 */
62
	private $postcode;
63
64
	/**
65
	 * @var string
66
	 *
67
	 * @ORM\Column(name="city", type="string", length=100, nullable=true)
68
	 */
69
	private $city;
70
71
	/**
72
	 * @var string
73
	 *
74
	 * @ORM\Column(name="country", type="string", length=8, options={"default":""}, nullable=true)
75
	 */
76
	private $country = '';
77
78
	/**
79
	 * @var integer
80
	 *
81
	 * @ORM\Column(name="id", type="integer")
82
	 * @ORM\Id
83
	 * @ORM\GeneratedValue(strategy="IDENTITY")
84
	 */
85
	private $id;
86
87
	/**
88
	 * Set salutation
89
	 *
90
	 * @param string $salutation
91
	 * @return Address
92
	 */
93
	public function setSalutation( $salutation ) {
94
		$this->salutation = $salutation;
95
96
		return $this;
97
	}
98
99
	/**
100
	 * Get salutation
101
	 *
102
	 * @return string
103
	 */
104
	public function getSalutation() {
105
		return $this->salutation;
106
	}
107
108
	/**
109
	 * Set company name
110
	 *
111
	 * @param string $company
112
	 * @return Address
113
	 */
114
	public function setCompany( $company ) {
115
		$this->company = $company;
116
117
		return $this;
118
	}
119
120
	/**
121
	 * Get company name
122
	 *
123
	 * @return string
124
	 */
125
	public function getCompany() {
126
		return $this->company;
127
	}
128
129
	/**
130
	 * Set title
131
	 *
132
	 * @param string $title
133
	 * @return Address
134
	 */
135
	public function setTitle( $title ) {
136
		$this->title = $title;
137
138
		return $this;
139
	}
140
141
	/**
142
	 * Get title
143
	 *
144
	 * @return string
145
	 */
146
	public function getTitle() {
147
		return $this->title;
148
	}
149
150
	/**
151
	 * Set first name
152
	 *
153
	 * @param string $firstName
154
	 * @return Address
155
	 */
156
	public function setFirstName( $firstName ) {
157
		$this->firstName = $firstName;
158
159
		return $this;
160
	}
161
162
	/**
163
	 * Get first name
164
	 *
165
	 * @return string
166
	 */
167
	public function getFirstName() {
168
		return $this->firstName;
169
	}
170
171
	/**
172
	 * Set last name
173
	 *
174
	 * @param string $lastName
175
	 * @return Address
176
	 */
177
	public function setLastName( $lastName ) {
178
		$this->lastName = $lastName;
179
180
		return $this;
181
	}
182
183
	/**
184
	 * Get last name
185
	 *
186
	 * @return string
187
	 */
188
	public function getLastName() {
189
		return $this->lastName;
190
	}
191
192
	/**
193
	 * Set address (street, etc)
194
	 *
195
	 * @param string $address
196
	 * @return Address
197
	 */
198
	public function setAddress( $address ) {
199
		$this->address = $address;
200
201
		return $this;
202
	}
203
204
	/**
205
	 * Get address (street, etc)
206
	 *
207
	 * @return string
208
	 */
209
	public function getAddress() {
210
		return $this->address;
211
	}
212
213
	/**
214
	 * Set postcode
215
	 *
216
	 * @param string $postcode
217
	 * @return Address
218
	 */
219
	public function setPostcode( $postcode ) {
220
		$this->postcode = $postcode;
221
222
		return $this;
223
	}
224
225
	/**
226
	 * Get postcode
227
	 *
228
	 * @return string
229
	 */
230
	public function getPostcode() {
231
		return $this->postcode;
232
	}
233
234
	/**
235
	 * Set city
236
	 *
237
	 * @param string $city
238
	 * @return Address
239
	 */
240
	public function setCity( $city ) {
241
		$this->city = $city;
242
243
		return $this;
244
	}
245
246
	/**
247
	 * Get city
248
	 *
249
	 * @return string
250
	 */
251
	public function getCity() {
252
		return $this->city;
253
	}
254
255
	/**
256
	 * Set country
257
	 *
258
	 * @param string $country
259
	 * @return Address
260
	 */
261
	public function setCountry( $country ) {
262
		$this->country = $country;
263
264
		return $this;
265
	}
266
267
	/**
268
	 * Get country
269
	 *
270
	 * @return string
271
	 */
272
	public function getCountry() {
273
		return $this->country;
274
	}
275
276
	/**
277
	 * @return int
278
	 */
279
	public function getId() {
280
		return $this->id;
281
	}
282
283
	/**
284
	 * @param int $id
285
	 */
286
	public function setId( $id ) {
287
		$this->id = $id;
288
	}
289
}