Completed
Push — master ( 1655c0...7ea5ef )
by Basil
02:14
created

PersonTrait::getAdditionalName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace luya\web\jsonld;
4
5
/**
6
 * JsonLd - Person trait
7
 *
8
 * @see http://schema.org/Person
9
 *
10
 * @author Alex Schmid
11
 * @since 1.0.0
12
 */
13
trait PersonTrait
14
{
15
    use ThingTrait {
16
        fields as thingFields;
17
    }
18
19
    /**
20
     * 	An additional name for a Person, can be used for a middle name.
21
     *
22
     * @var string
23
     */
24
    private $_additionalName;
25
26
    /**
27
     * @return string
28
     */
29
    public function getAdditionalName()
30
    {
31
        return $this->_additionalName;
32
    }
33
34
    /**
35
     * @param string $additionalName
36
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
37
     */
38
    public function setAdditionalName(string $additionalName)
39
    {
40
        $this->_additionalName = $additionalName;
41
        return $this;
42
    }
43
44
    /**
45
     * Physical address of the item.
46
     *
47
     * @var PostalAddress|string
48
     */
49
    private $_address;
50
51
    /**
52
     * @return PostalAddress|string
53
     */
54
    public function getAddress()
55
    {
56
        return $this->_address;
57
    }
58
59
    /**
60
     * @param PostalAddress|string $address
61
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
62
     */
63
    public function setAddress($address)
64
    {
65
        $this->_address = $address;
66
        return $this;
67
    }
68
69
    /**
70
     * An organization that this person is affiliated with. For example, a school/university, a club, or a team.
71
     *
72
     * @var Organization
73
     */
74
    private $_affiliation;
75
76
    /**
77
     * @return Organization
78
     */
79
    public function getAffiliation()
80
    {
81
        return $this->_affiliation;
82
    }
83
84
    /**
85
     * @param Organization $affiliation
86
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
87
     */
88
    public function setAffiliation(Organization $affiliation)
89
    {
90
        $this->_affiliation = $affiliation;
91
        return $this;
92
    }
93
94
    /**
95
     * An organization that the person is an alumni of.
96
     *
97
     * @var EducationalOrganization|Organization
98
     */
99
    private $_alumniOf;
100
101
    /**
102
     * @return EducationalOrganization|Organization
103
     */
104
    public function getAlumniOf()
105
    {
106
        return $this->_alumniOf;
107
    }
108
109
    /**
110
     * @param EducationalOrganization|Organization $alumniOf
111
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
112
     */
113
    public function setAlumniOf($alumniOf)
114
    {
115
        $this->_alumniOf = $alumniOf;
116
        return $this;
117
    }
118
119
    /**
120
     * An award won by or for this item.
121
     * Supersedes awards.
122
     *
123
     * @var string
124
     */
125
    private $_award;
126
127
    /**
128
     * @return string
129
     */
130
    public function getAward()
131
    {
132
        return $this->_award;
133
    }
134
135
    /**
136
     * @param string $award
137
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
138
     */
139
    public function setAward(string $award)
140
    {
141
        $this->_award = $award;
142
        return $this;
143
    }
144
145
    /**
146
     * Date of birth.
147
     *
148
     * @var Date
149
     */
150
    private $_birthDate;
151
152
    /**
153
     * @return Date
154
     */
155
    public function getBirthDate()
156
    {
157
        return $this->_birthDate;
158
    }
159
160
    /**
161
     * @param Date $birthDate
162
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
163
     */
164
    public function setBirthDate(Date $birthDate)
165
    {
166
        $this->_birthDate = $birthDate;
167
        return $this;
168
    }
169
170
    /**
171
     * The place where the person was born.
172
     *
173
     * @var Place
174
     */
175
    private $_birthPlace;
176
177
    /**
178
     * @return Place
179
     */
180
    public function getBirthPlace()
181
    {
182
        return $this->_birthPlace;
183
    }
184
185
    /**
186
     * @param Place $birthPlace
187
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
188
     */
189
    public function setBirthPlace(Place $birthPlace)
190
    {
191
        $this->_birthPlace = $birthPlace;
192
        return $this;
193
    }
194
195
    /**
196
     * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
197
     *
198
     * @var Brand|Organization
199
     */
200
    private $_brand;
201
202
    /**
203
     * @return Brand|Organization
204
     */
205
    public function getBrand()
206
    {
207
        return $this->_brand;
208
    }
209
210
    /**
211
     * @param Brand|Organization $brand
212
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
213
     */
214
    public function setBrand($brand)
215
    {
216
        $this->_brand = $brand;
217
        return $this;
218
    }
219
220
    /**
221
     * A child of the person.
222
     *
223
     * @var Person
224
     */
225
    private $_children;
226
227
    /**
228
     * @return Person
229
     */
230
    public function getChildren()
231
    {
232
        return $this->_children;
233
    }
234
235
    /**
236
     * @param Person $children
237
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
238
     */
239
    public function setChildren(Person $children)
240
    {
241
        $this->_children = $children;
242
        return $this;
243
    }
244
245
    /**
246
     * A colleague of the person.
247
     * Supersedes colleagues.
248
     *
249
     * @var Person
250
     */
251
    private $_colleague;
252
253
    /**
254
     * @return Person
255
     */
256
    public function getColleague()
257
    {
258
        return $this->_colleague;
259
    }
260
261
    /**
262
     * @param Person $colleague
263
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
264
     */
265
    public function setColleague(Person $colleague)
266
    {
267
        $this->_colleague = $colleague;
268
        return $this;
269
    }
270
271
    /**
272
     * A contact point for a person or organization.
273
     * Supersedes contactPoints.
274
     *
275
     * @var ContactPoint
276
     */
277
    private $_contactPoint;
278
279
    /**
280
     * @return ContactPoint
281
     */
282
    public function getContactPoint()
283
    {
284
        return $this->_contactPoint;
285
    }
286
287
    /**
288
     * @param ContactPoint $contactPoint
289
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
290
     */
291
    public function setContactPoint(ContactPoint $contactPoint)
292
    {
293
        $this->_contactPoint = $contactPoint;
294
        return $this;
295
    }
296
297
    /**
298
     * Date of death.
299
     *
300
     * @var Date
301
     */
302
    private $_deathDate;
303
304
    /**
305
     * @return Date
306
     */
307
    public function getDeathDate()
308
    {
309
        return $this->_deathDate;
310
    }
311
312
    /**
313
     * @param Date $deathDate
314
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
315
     */
316
    public function setDeathDate(Date $deathDate)
317
    {
318
        $this->_deathDate = $deathDate;
319
        return $this;
320
    }
321
322
    /**
323
     * The place where the person died.
324
     *
325
     * @var Place
326
     */
327
    private $_deathPlace;
328
329
    /**
330
     * @return Place
331
     */
332
    public function getDeathPlace()
333
    {
334
        return $this->_deathPlace;
335
    }
336
337
    /**
338
     * @param Place $deathPlace
339
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
340
     */
341
    public function setDeathPlace(Place $deathPlace)
342
    {
343
        $this->_deathPlace = $deathPlace;
344
        return $this;
345
    }
346
347
    /**
348
     * The Dun & Bradstreet DUNS number for identifying an organization or business person.
349
     *
350
     * @var string
351
     */
352
    private $_duns;
353
354
    /**
355
     * @return string
356
     */
357
    public function getDuns()
358
    {
359
        return $this->_duns;
360
    }
361
362
    /**
363
     * @param string $duns
364
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
365
     */
366
    public function setDuns(string $duns)
367
    {
368
        $this->_duns = $duns;
369
        return $this;
370
    }
371
372
    /**
373
     * Email address.
374
     *
375
     * @var string
376
     */
377
    private $_email;
378
379
    /**
380
     * @return string
381
     */
382
    public function getEmail()
383
    {
384
        return $this->_email;
385
    }
386
387
    /**
388
     * @param string $email
389
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
390
     */
391
    public function setEmail(string $email)
392
    {
393
        $this->_email = $email;
394
        return $this;
395
    }
396
397
    /**
398
     * Family name. In the U.S., the last name of an Person.
399
     * This can be used along with givenName instead of the name property.
400
     *
401
     * @var string
402
     */
403
    private $_familyName;
404
405
    /**
406
     * @return string
407
     */
408
    public function getFamilyName()
409
    {
410
        return $this->_familyName;
411
    }
412
413
    /**
414
     * @param string $familyName
415
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
416
     */
417
    public function setFamilyName(string $familyName)
418
    {
419
        $this->_familyName = $familyName;
420
        return $this;
421
    }
422
423
    /**
424
     * The fax number.
425
     *
426
     * @var string
427
     */
428
    private $_faxNumber;
429
430
    /**
431
     * @return string
432
     */
433
    public function getFaxNumber()
434
    {
435
        return $this->_faxNumber;
436
    }
437
438
    /**
439
     * @param string $faxNumber
440
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
441
     */
442
    public function setFaxNumber(string $faxNumber)
443
    {
444
        $this->_faxNumber = $faxNumber;
445
        return $this;
446
    }
447
448
    /**
449
     * The most generic uni-directional social relation.
450
     *
451
     * @var Person
452
     */
453
    private $_follows;
454
455
    /**
456
     * @return Person
457
     */
458
    public function getFollows()
459
    {
460
        return $this->_follows;
461
    }
462
463
    /**
464
     * @param Person $follows
465
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
466
     */
467
    public function setFollows(Person $follows)
468
    {
469
        $this->_follows = $follows;
470
        return $this;
471
    }
472
473
    /**
474
     * A person or organization that supports (sponsors) something through some kind of financial contribution.
475
     *
476
     * @var Organization|Person
477
     */
478
    private $_funder;
479
480
    /**
481
     * @return Organization|Person
482
     */
483
    public function getFunder()
484
    {
485
        return $this->_funder;
486
    }
487
488
    /**
489
     * @param Organization|Person $funder
490
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
491
     */
492
    public function setFunder($funder)
493
    {
494
        $this->_funder = $funder;
495
        return $this;
496
    }
497
498
    /**
499
     * Gender of the person. While http://schema.org/Male and http://schema.org/Female may be used,
500
     * text strings are also acceptable for people who do not identify as a binary gender.
501
     *
502
     * @var GenderType|string
503
     */
504
    private $_gender;
505
506
    /**
507
     * @return GenderType|string
508
     */
509
    public function getGender()
510
    {
511
        return $this->_gender;
512
    }
513
514
    /**
515
     * @param GenderType|string $gender
516
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
517
     */
518
    public function setGender($gender)
519
    {
520
        $this->_gender = $gender;
521
        return $this;
522
    }
523
524
    /**
525
     * Given name. In the U.S., the first name of a Person.
526
     * This can be used along with familyName instead of the name property.
527
     *
528
     * @var string
529
     */
530
    private $_givenName;
531
532
    /**
533
     * @return string
534
     */
535
    public function getGivenName()
536
    {
537
        return $this->_givenName;
538
    }
539
540
    /**
541
     * @param string $givenName
542
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
543
     */
544
    public function setGivenName(string $givenName)
545
    {
546
        $this->_givenName = $givenName;
547
        return $this;
548
    }
549
550
    /**
551
     * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN)
552
     * of the respective organization, person, or place.
553
     * The GLN is a 13-digit number used to identify parties and physical locations.
554
     *
555
     * @var string
556
     */
557
    private $_globalLocationNumber;
558
559
    /**
560
     * @return string
561
     */
562
    public function getGlobalLocationNumber()
563
    {
564
        return $this->_globalLocationNumber;
565
    }
566
567
    /**
568
     * @param string $globalLocationNumber
569
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
570
     */
571
    public function setGlobalLocationNumber(string $globalLocationNumber)
572
    {
573
        $this->_globalLocationNumber = $globalLocationNumber;
574
        return $this;
575
    }
576
577
    /**
578
     * The Person's occupation. For past professions, use Role for expressing dates.
579
     *
580
     * @var Occupation
581
     */
582
    private $_hasOccupation;
583
584
    /**
585
     * @return Occupation
586
     */
587
    public function getHasOccupation()
588
    {
589
        return $this->_hasOccupation;
590
    }
591
592
    /**
593
     * @param Occupation $hasOccupation
594
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
595
     */
596
    public function setHasOccupation(Occupation $hasOccupation)
597
    {
598
        $this->_hasOccupation = $hasOccupation;
599
        return $this;
600
    }
601
602
    /**
603
     * Indicates an OfferCatalog listing for this Organization, Person, or Service.
604
     *
605
     * @var OfferCatalog
606
     */
607
    private $_hasOfferCatalog;
608
609
    /**
610
     * @return OfferCatalog
611
     */
612
    public function getHasOfferCatalog()
613
    {
614
        return $this->_hasOfferCatalog;
615
    }
616
617
    /**
618
     * @param OfferCatalog $hasOfferCatalog
619
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
620
     */
621
    public function setHasOfferCatalog(OfferCatalog $hasOfferCatalog)
622
    {
623
        $this->_hasOfferCatalog = $hasOfferCatalog;
624
        return $this;
625
    }
626
627
    /**
628
     * Points-of-Sales operated by the organization or person.
629
     *
630
     * @var Place
631
     */
632
    private $_hasPOS;
633
634
    /**
635
     * @return Place
636
     */
637
    public function getHasPOS()
638
    {
639
        return $this->_hasPOS;
640
    }
641
642
    /**
643
     * @param Place $hasPOS
644
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
645
     */
646
    public function setHasPOS(Place $hasPOS)
647
    {
648
        $this->_hasPOS = $hasPOS;
649
        return $this;
650
    }
651
652
    /**
653
     * The height of the item.
654
     *
655
     * @var Distance|QuantitativeValue
656
     */
657
    private $_height;
658
659
    /**
660
     * @return Distance|QuantitativeValue
661
     */
662
    public function getHeight()
663
    {
664
        return $this->_height;
665
    }
666
667
    /**
668
     * @param Distance|QuantitativeValue $height
669
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
670
     */
671
    public function setHeight($height)
672
    {
673
        $this->_height = $height;
674
        return $this;
675
    }
676
677
    /**
678
     * A contact location for a person's residence.
679
     *
680
     * @var ContactPoint|Place
681
     */
682
    private $_homeLocation;
683
684
    /**
685
     * @return ContactPoint|Place
686
     */
687
    public function getHomeLocation()
688
    {
689
        return $this->_homeLocation;
690
    }
691
692
    /**
693
     * @param ContactPoint|Place $homeLocation
694
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
695
     */
696
    public function setHomeLocation($homeLocation)
697
    {
698
        $this->_homeLocation = $homeLocation;
699
        return $this;
700
    }
701
702
    /**
703
     * An honorific prefix preceding a Person's name such as Dr/Mrs/Mr.
704
     *
705
     * @var string
706
     */
707
    private $_honorificPrefix;
708
709
    /**
710
     * @return string
711
     */
712
    public function getHonorificPrefix()
713
    {
714
        return $this->_honorificPrefix;
715
    }
716
717
    /**
718
     * @param string $honorificPrefix
719
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
720
     */
721
    public function setHonorificPrefix(string $honorificPrefix)
722
    {
723
        $this->_honorificPrefix = $honorificPrefix;
724
        return $this;
725
    }
726
727
    /**
728
     * An honorific suffix preceding a Person's name such as M.D. /PhD/MSCSW.
729
     *
730
     * @var string
731
     */
732
    private $_honorificSuffix;
733
734
    /**
735
     * @return string
736
     */
737
    public function getHonorificSuffix()
738
    {
739
        return $this->_honorificSuffix;
740
    }
741
742
    /**
743
     * @param string $honorificSuffix
744
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
745
     */
746
    public function setHonorificSuffix(string $honorificSuffix)
747
    {
748
        $this->_honorificSuffix = $honorificSuffix;
749
        return $this;
750
    }
751
752
    /**
753
     * The International Standard of Industrial Classification of All Economic Activities (ISIC),
754
     * Revision 4 code for a particular organization, business person, or place.
755
     *
756
     * @var string
757
     */
758
    private $_isicV4;
759
760
    /**
761
     * @return string
762
     */
763
    public function getIsicV4()
764
    {
765
        return $this->_isicV4;
766
    }
767
768
    /**
769
     * @param string $isicV4
770
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
771
     */
772
    public function setIsicV4(string $isicV4)
773
    {
774
        $this->_isicV4 = $isicV4;
775
        return $this;
776
    }
777
778
    /**
779
     * The job title of the person (for example, Financial Manager).
780
     *
781
     * @var string
782
     */
783
    private $_jobTitle;
784
785
    /**
786
     * @return string
787
     */
788
    public function getJobTitle()
789
    {
790
        return $this->_jobTitle;
791
    }
792
793
    /**
794
     * @param string $jobTitle
795
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
796
     */
797
    public function setJobTitle(string $jobTitle)
798
    {
799
        $this->_jobTitle = $jobTitle;
800
        return $this;
801
    }
802
803
    /**
804
     * The most generic bi-directional social/work relation.
805
     *
806
     * @var Person
807
     */
808
    private $_knows;
809
810
    /**
811
     * @return Person
812
     */
813
    public function getKnows()
814
    {
815
        return $this->_knows;
816
    }
817
818
    /**
819
     * @param Person $knows
820
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
821
     */
822
    public function setKnows(Person $knows)
823
    {
824
        $this->_knows = $knows;
825
        return $this;
826
    }
827
828
    /**
829
     * A pointer to products or services offered by the organization or person.
830
     * Inverse property: offeredBy.
831
     *
832
     * @var Offer
833
     */
834
    private $_makesOffer;
835
836
    /**
837
     * @return Offer
838
     */
839
    public function getMakesOffer()
840
    {
841
        return $this->_makesOffer;
842
    }
843
844
    /**
845
     * @param Offer $makesOffer
846
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
847
     */
848
    public function setMakesOffer(Offer $makesOffer)
849
    {
850
        $this->_makesOffer = $makesOffer;
851
        return $this;
852
    }
853
854
    /**
855
     * An Organization (or ProgramMembership) to which this Person or Organization belongs.
856
     * Inverse property: member.
857
     *
858
     * @var Organization|ProgramMembership
859
     */
860
    private $_memberOf;
861
862
    /**
863
     * @return Organization|ProgramMembership
864
     */
865
    public function getMemberOf()
866
    {
867
        return $this->_memberOf;
868
    }
869
870
    /**
871
     * @param Organization|ProgramMembership $memberOf
872
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
873
     */
874
    public function setMemberOf($memberOf)
875
    {
876
        $this->_memberOf = $memberOf;
877
        return $this;
878
    }
879
880
    /**
881
     * The North American Industry Classification System (NAICS) code for a particular organization or business person.
882
     *
883
     * @var string
884
     */
885
    private $_naics;
886
887
    /**
888
     * @return string
889
     */
890
    public function getNaics()
891
    {
892
        return $this->_naics;
893
    }
894
895
    /**
896
     * @param string $naics
897
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
898
     */
899
    public function setNaics(string $naics)
900
    {
901
        $this->_naics = $naics;
902
        return $this;
903
    }
904
905
    /**
906
     * Nationality of the person.
907
     *
908
     * @var Country
909
     */
910
    private $_nationality;
911
912
    /**
913
     * @return Country
914
     */
915
    public function getNationality()
916
    {
917
        return $this->_nationality;
918
    }
919
920
    /**
921
     * @param Country $nationality
922
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
923
     */
924
    public function setNationality(Country $nationality)
925
    {
926
        $this->_nationality = $nationality;
927
        return $this;
928
    }
929
930
    /**
931
     * The total financial value of the person as calculated by subtracting assets from liabilities.
932
     *
933
     * @var MonetaryAmount|PriceSpecification
934
     */
935
    private $_netWorth;
936
937
    /**
938
     * @return MonetaryAmount|PriceSpecification
939
     */
940
    public function getNetWorth()
941
    {
942
        return $this->_netWorth;
943
    }
944
945
    /**
946
     * @param MonetaryAmount|PriceSpecification $netWorth
947
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
948
     */
949
    public function setNetWorth($netWorth)
950
    {
951
        $this->_netWorth = $netWorth;
952
        return $this;
953
    }
954
955
    /**
956
     * Products owned by the organization or person.
957
     *
958
     * @var OwnershipInfo|Product
959
     */
960
    private $_owns;
961
962
    /**
963
     * @return OwnershipInfo|Product
964
     */
965
    public function getOwns()
966
    {
967
        return $this->_owns;
968
    }
969
970
    /**
971
     * @param OwnershipInfo|Product $owns
972
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
973
     */
974
    public function setOwns($owns)
975
    {
976
        $this->_owns = $owns;
977
        return $this;
978
    }
979
980
    /**
981
     * A parent of this person. Supersedes parents.
982
     *
983
     * @var Person
984
     */
985
    private $_parent;
986
987
    /**
988
     * @return Person
989
     */
990
    public function getParent()
991
    {
992
        return $this->_parent;
993
    }
994
995
    /**
996
     * @param Person $parent
997
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
998
     */
999
    public function setParent(Person $parent)
1000
    {
1001
        $this->_parent = $parent;
1002
        return $this;
1003
    }
1004
1005
    /**
1006
     * Event that this person is a performer or participant in.
1007
     *
1008
     * @var Event
1009
     */
1010
    private $_performerIn;
1011
1012
    /**
1013
     * @return Event
1014
     */
1015
    public function getPerformerIn()
1016
    {
1017
        return $this->_performerIn;
1018
    }
1019
1020
    /**
1021
     * @param Event $performerIn
1022
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1023
     */
1024
    public function setPerformerIn(Event $performerIn)
1025
    {
1026
        $this->_performerIn = $performerIn;
1027
        return $this;
1028
    }
1029
1030
    /**
1031
     * The publishingPrinciples property indicates (typically via URL) a document describing the editorial principles
1032
     * of an Organization (or individual e.g. a Person writing a blog) that relate to their activities as a publisher,
1033
     * e.g. ethics or diversity policies. When applied to a CreativeWork (e.g. NewsArticle) the principles are those
1034
     * of the party primarily responsible for the creation of the CreativeWork.
1035
     *
1036
     * While such policies are most typically expressed in natural language, sometimes related information
1037
     * (e.g. indicating a funder) can be expressed using schema.org terminology.
1038
     *
1039
     * @var CreativeWork|URL
1040
     */
1041
    private $_publishingPrinciples;
1042
1043
    /**
1044
     * @return CreativeWork|URL
1045
     */
1046
    public function getPublishingPrinciples()
1047
    {
1048
        return $this->_publishingPrinciples;
1049
    }
1050
1051
    /**
1052
     * @param CreativeWork|URL $publishingPrinciples
1053
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1054
     */
1055
    public function setPublishingPrinciples($publishingPrinciples)
1056
    {
1057
        $this->_publishingPrinciples = $publishingPrinciples;
1058
        return $this;
1059
    }
1060
1061
    /**
1062
     * The most generic familial relation.
1063
     *
1064
     * @var Person
1065
     */
1066
    private $_relatedTo;
1067
1068
    /**
1069
     * @return Person
1070
     */
1071
    public function getRelatedTo()
1072
    {
1073
        return $this->_relatedTo;
1074
    }
1075
1076
    /**
1077
     * @param Person $relatedTo
1078
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1079
     */
1080
    public function setRelatedTo(Person $relatedTo)
1081
    {
1082
        $this->_relatedTo = $relatedTo;
1083
        return $this;
1084
    }
1085
1086
    /**
1087
     * A pointer to products or services sought by the organization or person (demand).
1088
     *
1089
     * @var Demand
1090
     */
1091
    private $_seeks;
1092
1093
    /**
1094
     * @return Demand
1095
     */
1096
    public function getSeeks()
1097
    {
1098
        return $this->_seeks;
1099
    }
1100
1101
    /**
1102
     * @param Demand $seeks
1103
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1104
     */
1105
    public function setSeeks(Demand $seeks)
1106
    {
1107
        $this->_seeks = $seeks;
1108
        return $this;
1109
    }
1110
1111
    /**
1112
     * A sibling of the person. Supersedes siblings.
1113
     *
1114
     * @var Person
1115
     */
1116
    private $_sibling;
1117
1118
    /**
1119
     * @return Person
1120
     */
1121
    public function getSibling()
1122
    {
1123
        return $this->_sibling;
1124
    }
1125
1126
    /**
1127
     * @param Person $sibling
1128
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1129
     */
1130
    public function setSibling(Person $sibling)
1131
    {
1132
        $this->_sibling = $sibling;
1133
        return $this;
1134
    }
1135
1136
    /**
1137
     * A person or organization that supports a thing through a pledge, promise, or financial contribution.
1138
     * e.g. a sponsor of a Medical Study or a corporate sponsor of an event.
1139
     *
1140
     * @var Organization|Person
1141
     */
1142
    private $_sponsor;
1143
1144
    /**
1145
     * @return Organization|Person
1146
     */
1147
    public function getSponsor()
1148
    {
1149
        return $this->_sponsor;
1150
    }
1151
1152
    /**
1153
     * @param Organization|Person $sponsor
1154
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1155
     */
1156
    public function setSponsor($sponsor)
1157
    {
1158
        $this->_sponsor = $sponsor;
1159
        return $this;
1160
    }
1161
1162
    /**
1163
     * The person's spouse.
1164
     *
1165
     * @var Person
1166
     */
1167
    private $_spouse;
1168
1169
    /**
1170
     * @return Person
1171
     */
1172
    public function getSpouse()
1173
    {
1174
        return $this->_spouse;
1175
    }
1176
1177
    /**
1178
     * @param Person $spouse
1179
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1180
     */
1181
    public function setSpouse(Person $spouse)
1182
    {
1183
        $this->_spouse = $spouse;
1184
        return $this;
1185
    }
1186
1187
    /**
1188
     * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain.
1189
     *
1190
     * @var string
1191
     */
1192
    private $_taxID;
1193
1194
    /**
1195
     * @return string
1196
     */
1197
    public function getTaxID()
1198
    {
1199
        return $this->_taxID;
1200
    }
1201
1202
    /**
1203
     * @param string $taxID
1204
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1205
     */
1206
    public function setTaxID(string $taxID)
1207
    {
1208
        $this->_taxID = $taxID;
1209
        return $this;
1210
    }
1211
1212
    /**
1213
     * The telephone number.
1214
     *
1215
     * @var string
1216
     */
1217
    private $_telephone;
1218
1219
    /**
1220
     * @return string
1221
     */
1222
    public function getTelephone()
1223
    {
1224
        return $this->_telephone;
1225
    }
1226
1227
    /**
1228
     * @param string $telephone
1229
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1230
     */
1231
    public function setTelephone(string $telephone)
1232
    {
1233
        $this->_telephone = $telephone;
1234
        return $this;
1235
    }
1236
1237
    /**
1238
     * The Value-added Tax ID of the organization or person.
1239
     *
1240
     * @var string
1241
     */
1242
    private $_vatID;
1243
1244
    /**
1245
     * @return string
1246
     */
1247
    public function getVatID()
1248
    {
1249
        return $this->_vatID;
1250
    }
1251
1252
    /**
1253
     * @param string $vatID
1254
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1255
     */
1256
    public function setVatID(string $vatID)
1257
    {
1258
        $this->_vatID = $vatID;
1259
        return $this;
1260
    }
1261
1262
    /**
1263
     * The weight of the product or person.
1264
     *
1265
     * @var QuantitativeValue
1266
     */
1267
    private $_weight;
1268
1269
    /**
1270
     * @return QuantitativeValue
1271
     */
1272
    public function getWeight()
1273
    {
1274
        return $this->_weight;
1275
    }
1276
1277
    /**
1278
     * @param QuantitativeValue $weight
1279
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1280
     */
1281
    public function setWeight(QuantitativeValue $weight)
1282
    {
1283
        $this->_weight = $weight;
1284
        return $this;
1285
    }
1286
1287
    /**
1288
     * A contact location for a person's place of work.
1289
     *
1290
     * @var ContactPoint|Place
1291
     */
1292
    private $_workLocation;
1293
1294
    /**
1295
     * @return ContactPoint|Place
1296
     */
1297
    public function getWorkLocation()
1298
    {
1299
        return $this->_workLocation;
1300
    }
1301
1302
    /**
1303
     * @param ContactPoint|Place $workLocation
1304
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1305
     */
1306
    public function setWorkLocation($workLocation)
1307
    {
1308
        $this->_workLocation = $workLocation;
1309
        return $this;
1310
    }
1311
1312
    /**
1313
     * Organizations that the person works for.
1314
     *
1315
     * @var Organization
1316
     */
1317
    private $_worksFor;
1318
1319
    /**
1320
     * @return Organization
1321
     */
1322
    public function getWorksFor()
1323
    {
1324
        return $this->_worksFor;
1325
    }
1326
1327
    /**
1328
     * @param Organization $worksFor
1329
     * @return PersonTrait
0 ignored issues
show
Comprehensibility Bug introduced by
The return type PersonTrait is a trait, and thus cannot be used for type-hinting in PHP. Maybe consider adding an interface and use that for type-hinting?

In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.

If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.

Loading history...
1330
     */
1331
    public function setWorksFor(Organization $worksFor)
1332
    {
1333
        $this->_worksFor = $worksFor;
1334
        return $this;
1335
    }
1336
1337
    /**
1338
     * Return the fields
1339
     */
1340
    public function fields()
1341
    {
1342
        return array_merge(['additionalName', 'address', 'affiliation', 'alumniOf', 'award', 'birthDate', 'birthPlace',
1343
            'brand', 'children', 'colleague', 'contactPoint', 'deathDate', 'deathPlace', 'duns', 'email', 'familyName',
1344
            'faxNumber', 'follows', 'funder', 'gender', 'givenName', 'globalLocationNumber', 'hasOccupation',
1345
            'hasOfferCatalog', 'hasPOS', 'height', 'homeLocation', 'honorificPrefix', 'honorificSuffix', 'isicV4',
1346
            'jobTitle', 'knows', 'makesOffer', 'memberOf', 'naics', 'nationality', 'netWorth', 'owns', 'parent',
1347
            'performerIn', 'publishingPrinciples', 'relatedTo', 'seeks', 'sibling', 'sponsor', 'spouse', 'taxID',
1348
            'telephone', 'vatID', 'weight', 'workLocation', 'worksFor'],$this->thingFields());
0 ignored issues
show
Bug introduced by
The method thingFields() does not exist on luya\web\jsonld\PersonTrait. Did you maybe mean fields()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
1349
    }
1350
}