@@ -195,7 +195,7 @@ |
||
195 | 195 | // "type=INTERNET". |
196 | 196 | if (!empty($types)) { |
197 | 197 | $types = array_map( |
198 | - function ($type) { |
|
198 | + function($type) { |
|
199 | 199 | return preg_replace('/^type=/i', '', $type); |
200 | 200 | }, |
201 | 201 | $types |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * @param null|string $raw |
42 | 42 | */ |
43 | - public function setRaw(?string $raw): void |
|
43 | + public function setRaw(?string $raw) : void |
|
44 | 44 | { |
45 | 45 | $this->raw = $raw; |
46 | 46 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | /** |
57 | 57 | * @param null|string $fileType |
58 | 58 | */ |
59 | - public function setFileType(?string $fileType): void |
|
59 | + public function setFileType(?string $fileType) : void |
|
60 | 60 | { |
61 | 61 | $this->fileType = $fileType; |
62 | 62 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * @param null|string $url |
74 | 74 | */ |
75 | - public function setUrl(?string $url): void |
|
75 | + public function setUrl(?string $url) : void |
|
76 | 76 | { |
77 | 77 | $this->url = $url; |
78 | 78 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * @param null|string $value |
82 | 82 | * @param bool $isRawValue |
83 | 83 | */ |
84 | - public function parser(?string $value, bool $isRawValue): void |
|
84 | + public function parser(?string $value, bool $isRawValue) : void |
|
85 | 85 | { |
86 | 86 | if ($isRawValue) { |
87 | 87 | $this->setRaw($value); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * @param string $raw |
132 | 132 | * @param null|string $fileType |
133 | 133 | */ |
134 | - public function addRawMedia(string $raw, ?string $fileType = null): void |
|
134 | + public function addRawMedia(string $raw, ?string $fileType = null) : void |
|
135 | 135 | { |
136 | 136 | $this->setRaw($raw); |
137 | 137 | $this->setFileType($fileType); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | /** |
157 | 157 | * @param null|string $lastName |
158 | 158 | */ |
159 | - public function setLastName(?string $lastName): void |
|
159 | + public function setLastName(?string $lastName) : void |
|
160 | 160 | { |
161 | 161 | $this->lastName = $lastName; |
162 | 162 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | /** |
173 | 173 | * @param null|string $firstName |
174 | 174 | */ |
175 | - public function setFirstName(?string $firstName): void |
|
175 | + public function setFirstName(?string $firstName) : void |
|
176 | 176 | { |
177 | 177 | $this->firstName = $firstName; |
178 | 178 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | /** |
189 | 189 | * @param null|string $additional |
190 | 190 | */ |
191 | - public function setAdditional(?string $additional): void |
|
191 | + public function setAdditional(?string $additional) : void |
|
192 | 192 | { |
193 | 193 | $this->additional = $additional; |
194 | 194 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | /** |
205 | 205 | * @param null|string $prefix |
206 | 206 | */ |
207 | - public function setPrefix(?string $prefix): void |
|
207 | + public function setPrefix(?string $prefix) : void |
|
208 | 208 | { |
209 | 209 | $this->prefix = $prefix; |
210 | 210 | } |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | /** |
221 | 221 | * @param null|string $suffix |
222 | 222 | */ |
223 | - public function setSuffix(?string $suffix): void |
|
223 | + public function setSuffix(?string $suffix) : void |
|
224 | 224 | { |
225 | 225 | $this->suffix = $suffix; |
226 | 226 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | /** |
237 | 237 | * @param \DateTime|null $birthday |
238 | 238 | */ |
239 | - public function setBirthday(?\DateTime $birthday): void |
|
239 | + public function setBirthday(?\DateTime $birthday) : void |
|
240 | 240 | { |
241 | 241 | $this->birthday = $birthday; |
242 | 242 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | /** |
245 | 245 | * @return VCardAddress[][]|null |
246 | 246 | */ |
247 | - public function getAddresses(): ?array |
|
247 | + public function getAddresses(): ? array |
|
248 | 248 | { |
249 | 249 | return $this->address; |
250 | 250 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | /** |
253 | 253 | * @param VCardAddress[][]|null $address |
254 | 254 | */ |
255 | - public function setAddresses(?array $address): void |
|
255 | + public function setAddresses(? array $address) : void |
|
256 | 256 | { |
257 | 257 | $this->address = $address; |
258 | 258 | } |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * |
263 | 263 | * @return VCardAddress[]|null |
264 | 264 | */ |
265 | - public function getAddress(string $key): ?array |
|
265 | + public function getAddress(string $key): ? array |
|
266 | 266 | { |
267 | 267 | return $this->address[$key]; |
268 | 268 | } |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * @return null|string[][] |
281 | 281 | */ |
282 | - public function getPhones(): ?array |
|
282 | + public function getPhones(): ? array |
|
283 | 283 | { |
284 | 284 | return $this->phone; |
285 | 285 | } |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | /** |
288 | 288 | * @param null|string[][] $phone |
289 | 289 | */ |
290 | - public function setPhones(?array $phone): void |
|
290 | + public function setPhones(? array $phone) : void |
|
291 | 291 | { |
292 | 292 | $this->phone = $phone; |
293 | 293 | } |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | * |
298 | 298 | * @return string[]|null |
299 | 299 | */ |
300 | - public function getPhone(string $key): ?array |
|
300 | + public function getPhone(string $key): ? array |
|
301 | 301 | { |
302 | 302 | return $this->phone[$key]; |
303 | 303 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | /** |
315 | 315 | * @return null|string[][] |
316 | 316 | */ |
317 | - public function getEmails(): ?array |
|
317 | + public function getEmails(): ? array |
|
318 | 318 | { |
319 | 319 | return $this->email; |
320 | 320 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | /** |
323 | 323 | * @param null|string[][] $email |
324 | 324 | */ |
325 | - public function setEmails(?array $email): void |
|
325 | + public function setEmails(? array $email) : void |
|
326 | 326 | { |
327 | 327 | $this->email = $email; |
328 | 328 | } |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | * |
333 | 333 | * @return string[]|null |
334 | 334 | */ |
335 | - public function getEmail(string $key): ?array |
|
335 | + public function getEmail(string $key): ? array |
|
336 | 336 | { |
337 | 337 | return $this->email[$key]; |
338 | 338 | } |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | /** |
358 | 358 | * @param null|string $revision |
359 | 359 | */ |
360 | - public function setRevision(?string $revision): void |
|
360 | + public function setRevision(?string $revision) : void |
|
361 | 361 | { |
362 | 362 | $this->revision = $revision; |
363 | 363 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | /** |
374 | 374 | * @param null|string $version |
375 | 375 | */ |
376 | - public function setVersion(?string $version): void |
|
376 | + public function setVersion(?string $version) : void |
|
377 | 377 | { |
378 | 378 | $this->version = $version; |
379 | 379 | } |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | /** |
390 | 390 | * @param null|string $organization |
391 | 391 | */ |
392 | - public function setOrganization(?string $organization): void |
|
392 | + public function setOrganization(?string $organization) : void |
|
393 | 393 | { |
394 | 394 | $this->organization = $organization; |
395 | 395 | } |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | /** |
398 | 398 | * @return null|string[][] |
399 | 399 | */ |
400 | - public function getUrls(): ?array |
|
400 | + public function getUrls(): ? array |
|
401 | 401 | { |
402 | 402 | return $this->url; |
403 | 403 | } |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | /** |
406 | 406 | * @param null|string[][] $url |
407 | 407 | */ |
408 | - public function setUrls(?array $url): void |
|
408 | + public function setUrls(? array $url) : void |
|
409 | 409 | { |
410 | 410 | $this->url = $url; |
411 | 411 | } |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | * |
416 | 416 | * @return string[]|null |
417 | 417 | */ |
418 | - public function getUrl(string $key): ?array |
|
418 | + public function getUrl(string $key): ? array |
|
419 | 419 | { |
420 | 420 | return $this->url[$key]; |
421 | 421 | } |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | /** |
441 | 441 | * @param null|string $title |
442 | 442 | */ |
443 | - public function setTitle(?string $title): void |
|
443 | + public function setTitle(?string $title) : void |
|
444 | 444 | { |
445 | 445 | $this->title = $title; |
446 | 446 | } |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | /** |
457 | 457 | * @param null|VCardMedia $photo |
458 | 458 | */ |
459 | - public function setPhoto(?VCardMedia $photo): void |
|
459 | + public function setPhoto(?VCardMedia $photo) : void |
|
460 | 460 | { |
461 | 461 | $this->photo = $photo; |
462 | 462 | } |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | /** |
473 | 473 | * @param null|VCardMedia $logo |
474 | 474 | */ |
475 | - public function setLogo(?VCardMedia $logo): void |
|
475 | + public function setLogo(?VCardMedia $logo) : void |
|
476 | 476 | { |
477 | 477 | $this->logo = $logo; |
478 | 478 | } |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | /** |
489 | 489 | * @param null|string $note |
490 | 490 | */ |
491 | - public function setNote(?string $note): void |
|
491 | + public function setNote(?string $note) : void |
|
492 | 492 | { |
493 | 493 | $this->note = $note; |
494 | 494 | } |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | /** |
497 | 497 | * @return array|null |
498 | 498 | */ |
499 | - public function getCategories(): ?array |
|
499 | + public function getCategories(): ? array |
|
500 | 500 | { |
501 | 501 | return $this->categories; |
502 | 502 | } |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | /** |
505 | 505 | * @param array|null $categories |
506 | 506 | */ |
507 | - public function setCategories(?array $categories): void |
|
507 | + public function setCategories(? array $categories) : void |
|
508 | 508 | { |
509 | 509 | $this->categories = $categories; |
510 | 510 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * @param string|null $name |
64 | 64 | */ |
65 | - public function setName(?string $name): void |
|
65 | + public function setName(?string $name) : void |
|
66 | 66 | { |
67 | 67 | $this->name = $name; |
68 | 68 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * @param string|null $extended |
80 | 80 | */ |
81 | - public function setExtended(?string $extended): void |
|
81 | + public function setExtended(?string $extended) : void |
|
82 | 82 | { |
83 | 83 | $this->extended = $extended; |
84 | 84 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | /** |
95 | 95 | * @param string|null $street |
96 | 96 | */ |
97 | - public function setStreet(?string $street): void |
|
97 | + public function setStreet(?string $street) : void |
|
98 | 98 | { |
99 | 99 | $this->street = $street; |
100 | 100 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | /** |
111 | 111 | * @param string|null $locality |
112 | 112 | */ |
113 | - public function setLocality(?string $locality): void |
|
113 | + public function setLocality(?string $locality) : void |
|
114 | 114 | { |
115 | 115 | $this->locality = $locality; |
116 | 116 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | /** |
127 | 127 | * @param string|null $region |
128 | 128 | */ |
129 | - public function setRegion(?string $region): void |
|
129 | + public function setRegion(?string $region) : void |
|
130 | 130 | { |
131 | 131 | $this->region = $region; |
132 | 132 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * @param string|null $postalCode |
144 | 144 | */ |
145 | - public function setPostalCode(?string $postalCode): void |
|
145 | + public function setPostalCode(?string $postalCode) : void |
|
146 | 146 | { |
147 | 147 | $this->postalCode = $postalCode; |
148 | 148 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | /** |
159 | 159 | * @param string|null $country |
160 | 160 | */ |
161 | - public function setCountry(?string $country): void |
|
161 | + public function setCountry(?string $country) : void |
|
162 | 162 | { |
163 | 163 | $this->country = $country; |
164 | 164 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | /** |
175 | 175 | * @param string|null $label |
176 | 176 | */ |
177 | - public function setLabel(?string $label): void |
|
177 | + public function setLabel(?string $label) : void |
|
178 | 178 | { |
179 | 179 | $this->label = $label; |
180 | 180 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | * |
235 | 235 | * @throws ElementAlreadyExistsException |
236 | 236 | */ |
237 | - private function addBirthday(?\DateTime $date): void |
|
237 | + private function addBirthday(?\DateTime $date) : void |
|
238 | 238 | { |
239 | 239 | if ($date !== null) { |
240 | 240 | $this->setProperty( |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | * |
254 | 254 | * @throws ElementAlreadyExistsException |
255 | 255 | */ |
256 | - private function addOrganization(?string $company, string $department = ''): void |
|
256 | + private function addOrganization(?string $company, string $department = '') : void |
|
257 | 257 | { |
258 | 258 | if ($company !== null) { |
259 | 259 | $this->setProperty( |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | ?string $additional = '', |
287 | 287 | ?string $prefix = '', |
288 | 288 | ?string $suffix = '' |
289 | - ): void { |
|
289 | + ) : void { |
|
290 | 290 | if ($lastName !== null) { |
291 | 291 | // define values with non-empty values |
292 | 292 | $values = array_filter( |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | * |
330 | 330 | * @throws ElementAlreadyExistsException |
331 | 331 | */ |
332 | - private function addCategories(?array $categories): void |
|
332 | + private function addCategories(? array $categories) : void |
|
333 | 333 | { |
334 | 334 | if ($categories !== null) { |
335 | 335 | $this->setProperty( |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * |
374 | 374 | * @throws ElementAlreadyExistsException |
375 | 375 | */ |
376 | - private function setStringProperty(string $element, string $property, ?string $value): void |
|
376 | + private function setStringProperty(string $element, string $property, ?string $value) : void |
|
377 | 377 | { |
378 | 378 | if ($value !== null) { |
379 | 379 | $this->setProperty( |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | * |
394 | 394 | * @throws ElementAlreadyExistsException |
395 | 395 | */ |
396 | - private function setMedia(string $element, string $property, ?VCardMedia $media): void |
|
396 | + private function setMedia(string $element, string $property, ?VCardMedia $media) : void |
|
397 | 397 | { |
398 | 398 | if ($media !== null) { |
399 | 399 | $result = []; |