Organization::GetDepartment()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 8
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
* @author SignpostMarv
4
*/
5
declare(strict_types=1);
6
7
namespace SignpostMarv\DaftObject\SchemaOrg;
8
9
use SignpostMarv\DaftObject\SchemaOrg\CreativeWork\Article;
10
use SignpostMarv\DaftObject\SchemaOrg\CreativeWork\MediaObject\ImageObject;
11
use SignpostMarv\DaftObject\SchemaOrg\CreativeWork\Review;
12
use SignpostMarv\DaftObject\SchemaOrg\CreativeWork\WebPage\AboutPage;
13
use SignpostMarv\DaftObject\SchemaOrg\DataTypes\Date;
14
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Brand;
15
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Demand;
16
use SignpostMarv\DaftObject\SchemaOrg\Intangible\ItemList\OfferCatalog;
17
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Language;
18
use SignpostMarv\DaftObject\SchemaOrg\Intangible\ProgramMembership;
19
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Rating\AggregateRating;
20
use SignpostMarv\DaftObject\SchemaOrg\Intangible\StructuredValue\ContactPoint;
21
use SignpostMarv\DaftObject\SchemaOrg\Intangible\StructuredValue\ContactPoint\PostalAddress;
22
use SignpostMarv\DaftObject\SchemaOrg\Intangible\StructuredValue\OwnershipInfo;
23
use SignpostMarv\DaftObject\SchemaOrg\Intangible\StructuredValue\QuantitativeValue;
24
use SignpostMarv\DaftObject\SchemaOrg\Place\AdministrativeArea;
25
26
/**
27
* @property array<int, string|CreativeWork> $actionableFeedbackPolicy
28
* @property array<int, string|PostalAddress> $address
29
* @property array<int, AggregateRating> $aggregateRating
30
* @property array<int, Person> $alumni
31
* @property array<int, string|AdministrativeArea|GeoShape|Place> $areaServed
32
* @property array<int, string> $award
33
* @property array<int, Brand|Organization> $brand
34
* @property array<int, ContactPoint> $contactPoint
35
* @property array<int, string|CreativeWork> $correctionsPolicy
36
* @property array<int, Organization> $department
37
* @property array<int, Date> $dissolutionDate
38
* @property array<int, string|CreativeWork> $diversityPolicy
39
* @property array<int, string|Article> $diversityStaffingReport
40
* @property array<int, string> $duns
41
* @property array<int, string> $email
42
* @property array<int, Person> $employee
43
* @property array<int, string|CreativeWork> $ethicsPolicy
44
* @property array<int, Event> $event
45
* @property array<int, string> $faxNumber
46
* @property array<int, Person> $founder
47
* @property array<int, Date> $foundingDate
48
* @property array<int, Place> $foundingLocation
49
* @property array<int, Organization|Person> $funder
50
* @property array<int, string> $globalLocationNumber
51
* @property array<int, OfferCatalog> $hasOfferCatalog
52
* @property array<int, Place> $hasPOS
53
* @property array<int, string> $isicV4
54
* @property array<int, string|Thing> $knowsAbout
55
* @property array<int, string|Language> $knowsLanguage
56
* @property array<int, string> $legalName
57
* @property array<int, string> $leiCode
58
* @property array<int, string|Place|PostalAddress> $location
59
* @property array<int, ImageObject> $logo
60
* @property array<int, Offer> $makesOffer
61
* @property array<int, Organization|Person> $member
62
* @property array<int, Organization|ProgramMembership> $memberOf
63
* @property array<int, string> $naics
64
* @property array<int, QuantitativeValue> $numberOfEmployees
65
* @property array<int, string|AboutPage|CreativeWork> $ownershipFundingInfo
66
* @property array<int, OwnershipInfo|Product> $owns
67
* @property array<int, Organization> $parentOrganization
68
* @property array<int, string|CreativeWork> $publishingPrinciples
69
* @property array<int, Review> $review
70
* @property array<int, Demand> $seeks
71
* @property array<int, Organization|Person> $sponsor
72
* @property array<int, Organization> $subOrganization
73
* @property array<int, string> $taxID
74
* @property array<int, string> $telephone
75
* @property array<int, string|CreativeWork> $unnamedSourcesPolicy
76
* @property array<int, string> $vatID
77
*/
78
class Organization extends Thing
79
{
80
    use DaftObjectTraits\HasAddress;
81
    use DaftObjectTraits\HasAggregateRating;
82
    use DaftObjectTraits\HasAreaServed;
83
    use DaftObjectTraits\HasAward;
84
    use DaftObjectTraits\HasBrand;
85
    use DaftObjectTraits\HasContactPoint;
86
    use DaftObjectTraits\HasDuns;
87
    use DaftObjectTraits\HasEmail;
88
    use DaftObjectTraits\HasEvent;
89
    use DaftObjectTraits\HasFaxNumber;
90
    use DaftObjectTraits\HasFunder;
91
    use DaftObjectTraits\HasGlobalLocationNumber;
92
    use DaftObjectTraits\HasHasOfferCatalog;
93
    use DaftObjectTraits\HasHasPOS;
94
    use DaftObjectTraits\HasIsicV4;
95
    use DaftObjectTraits\HasKnowsAbout;
96
    use DaftObjectTraits\HasKnowsLanguage;
97
    use DaftObjectTraits\HasLocation;
98
    use DaftObjectTraits\HasLogo;
99
    use DaftObjectTraits\HasMakesOffer;
100
    use DaftObjectTraits\HasMember;
101
    use DaftObjectTraits\HasMemberOf;
102
    use DaftObjectTraits\HasNaics;
103
    use DaftObjectTraits\HasOwns;
104
    use DaftObjectTraits\HasPublishingPrinciples;
105
    use DaftObjectTraits\HasReview;
106
    use DaftObjectTraits\HasSeeks;
107
    use DaftObjectTraits\HasSponsors;
108
    use DaftObjectTraits\HasTaxID;
109
    use DaftObjectTraits\HasTelephone;
110
    use DaftObjectTraits\HasVatID;
111
112
    const SCHEMA_ORG_TYPE = 'Organization';
113
114
    const PROPERTIES = [
115
        'actionableFeedbackPolicy',
116
        'address',
117
        'aggregateRating',
118
        'alumni',
119
        'areaServed',
120
        'award',
121
        'brand',
122
        'contactPoint',
123
        'correctionsPolicy',
124
        'department',
125
        'dissolutionDate',
126
        'diversityPolicy',
127
        'diversityStaffingReport',
128
        'duns',
129
        'email',
130
        'employee',
131
        'ethicsPolicy',
132
        'event',
133
        'faxNumber',
134
        'founder',
135
        'foundingDate',
136
        'foundingLocation',
137
        'funder',
138
        'globalLocationNumber',
139
        'hasOfferCatalog',
140
        'hasPOS',
141
        'isicV4',
142
        'knowsAbout',
143
        'knowsLanguage',
144
        'legalName',
145
        'leiCode',
146
        'location',
147
        'logo',
148
        'makesOffer',
149
        'member',
150
        'memberOf',
151
        'naics',
152
        'numberOfEmployees',
153
        'ownershipFundingInfo',
154
        'owns',
155
        'parentOrganization',
156
        'publishingPrinciples',
157
        'review',
158
        'seeks',
159
        'sponsor',
160
        'subOrganization',
161
        'taxID',
162
        'telephone',
163
        'unnamedSourcesPolicy',
164
        'vatID',
165
    ];
166
167
    const PROPERTIES_WITH_MULTI_TYPED_ARRAYS = [
168
        'actionableFeedbackPolicy' => [
169
            'string',
170
            CreativeWork::class,
171
        ],
172
        'address' => TypeUtilities::MULTI_TYPE_DICT__address,
173
        'aggregateRating' => [
174
            AggregateRating::class,
175
        ],
176
        'alumni' => [
177
            Person::class,
178
        ],
179
        'areaServed' => [
180
            'string',
181
            AdministrativeArea::class,
182
            GeoShape::class,
183
            Place::class,
184
        ],
185
        'award' => [
186
            'string',
187
        ],
188
        'brand' => [
189
            Brand::class,
190
            Organization::class,
191
        ],
192
        'contactPoint' => [
193
            ContactPoint::class,
194
        ],
195
        'correctionsPolicy' => [
196
            'string',
197
            CreativeWork::class,
198
        ],
199
        'department' => [
200
            Organization::class,
201
        ],
202
        'dissolutionDate' => [
203
            Date::class,
204
        ],
205
        'diversityPolicy' => [
206
            'string',
207
            CreativeWork::class,
208
        ],
209
        'diversityStaffingReport' => [
210
            'string',
211
            Article::class,
212
        ],
213
        'duns' => [
214
            'string',
215
        ],
216
        'email' => [
217
            'string',
218
        ],
219
        'employee' => [
220
            Person::class,
221
        ],
222
        'ethicsPolicy' => [
223
            'string',
224
            CreativeWork::class,
225
        ],
226
        'event' => [
227
            Event::class,
228
        ],
229
        'faxNumber' => [
230
            'string',
231
        ],
232
        'founder' => [
233
            Person::class,
234
        ],
235
        'foundingDate' => [
236
            Date::class,
237
        ],
238
        'foundingLocation' => [
239
            Place::class,
240
        ],
241
        'funder' => [
242
            Organization::class,
243
            Person::class,
244
        ],
245
        'globalLocationNumber' => [
246
            'string',
247
        ],
248
        'hasOfferCatalog' => [
249
            OfferCatalog::class,
250
        ],
251
        'hasPOS' => [
252
            Place::class,
253
        ],
254
        'isicV4' => [
255
            'string',
256
        ],
257
        'knowsAbout' => [
258
            'string',
259
            Thing::class,
260
        ],
261
        'knowsLanguage' => [
262
            'string',
263
            Language::class,
264
        ],
265
        'legalName' => [
266
            'string',
267
        ],
268
        'leiCode' => [
269
            'string',
270
        ],
271
        'location' => [
272
            'string',
273
            Place::class,
274
            PostalAddress::class,
275
        ],
276
        'logo' => [
277
            ImageObject::class,
278
        ],
279
        'makesOffer' => [
280
            Offer::class,
281
        ],
282
        'member' => [
283
            Organization::class,
284
            Person::class,
285
        ],
286
        'memberOf' => [
287
            Organization::class,
288
            ProgramMembership::class,
289
        ],
290
        'naics' => [
291
            'string',
292
        ],
293
        'numberOfEmployees' => [
294
            QuantitativeValue::class,
295
        ],
296
        'ownershipFundingInfo' => [
297
            'string',
298
            AboutPage::class,
299
            CreativeWork::class,
300
        ],
301
        'owns' => [
302
            OwnershipInfo::class,
303
            Product::class,
304
        ],
305
        'parentOrganization' => [
306
            Organization::class,
307
        ],
308
        'publishingPrinciples' => [
309
            'string',
310
            CreativeWork::class,
311
        ],
312
        'review' => [
313
            Review::class,
314
        ],
315
        'seeks' => [
316
            Demand::class,
317
        ],
318
        'sponsor' => [
319
            Organization::class,
320
            Person::class,
321
        ],
322
        'subOrganization' => [
323
            Organization::class,
324
        ],
325
        'taxID' => [
326
            'string',
327
        ],
328
        'telephone' => [
329
            'string',
330
        ],
331
        'unnamedSourcesPolicy' => [
332
            'string',
333
            CreativeWork::class,
334
        ],
335
        'vatID' => [
336
            'string',
337
        ],
338
    ];
339
340
    /**
341
    * @return array<int, string|CreativeWork>
342
    */
343 68
    public function GetActionableFeedbackPolicy() : array
344
    {
345
        /**
346
        * @var array<int, string|CreativeWork>
347
        */
348 68
        $out = $this->ExpectRetrievedValueIsArray('actionableFeedbackPolicy');
349
350 68
        return $out;
351
    }
352
353
    /**
354
    * @param array<int, string|CreativeWork> $value
355
    */
356 2
    public function SetActionableFeedbackPolicy(array $value) : void
357
    {
358 2
        $this->NudgePropertyValue('actionableFeedbackPolicy', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
359 2
    }
360
361
    /**
362
    * @return array<int, Person>
363
    */
364 68
    public function GetAlumni() : array
365
    {
366
        /**
367
        * @var array<int, Person>
368
        */
369 68
        $out = $this->ExpectRetrievedValueIsArray('alumni');
370
371 68
        return $out;
372
    }
373
374
    /**
375
    * @param array<int, Person> $value
376
    */
377 2
    public function SetAlumni(array $value) : void
378
    {
379 2
        $this->NudgePropertyValue('alumni', $value);
380 2
    }
381
382
    /**
383
    * @return array<int, string|CreativeWork>
384
    */
385 68
    public function GetCorrectionsPolicy() : array
386
    {
387
        /**
388
        * @var array<int, string|CreativeWork>
389
        */
390 68
        $out = $this->ExpectRetrievedValueIsArray('correctionsPolicy');
391
392 68
        return $out;
393
    }
394
395
    /**
396
    * @param array<int, string|CreativeWork> $value
397
    */
398 2
    public function SetCorrectionsPolicy(array $value) : void
399
    {
400 2
        $this->NudgePropertyValue('correctionsPolicy', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
401 2
    }
402
403
    /**
404
    * @return array<int, Organization>
405
    */
406 68
    public function GetDepartment() : array
407
    {
408
        /**
409
        * @var array<int, Organization>
410
        */
411 68
        $out = $this->ExpectRetrievedValueIsArray('department');
412
413 68
        return $out;
414
    }
415
416
    /**
417
    * @param array<int, Organization> $value
418
    */
419 2
    public function SetDepartment(array $value) : void
420
    {
421 2
        $this->NudgePropertyValue('department', $value);
422 2
    }
423
424
    /**
425
    * @return array<int, Date>
426
    */
427 68
    public function GetDissolutionDate() : array
428
    {
429
        /**
430
        * @var array<int, Date>
431
        */
432 68
        $out = $this->ExpectRetrievedValueIsArray('dissolutionDate');
433
434 68
        return $out;
435
    }
436
437
    /**
438
    * @param array<int, Date> $value
439
    */
440 2
    public function SetDissolutionDate(array $value) : void
441
    {
442 2
        $this->NudgePropertyValue('dissolutionDate', $value);
443 2
    }
444
445
    /**
446
    * @return array<int, string|CreativeWork>
447
    */
448 68
    public function GetDiversityPolicy() : array
449
    {
450
        /**
451
        * @var array<int, string|CreativeWork>
452
        */
453 68
        $out = $this->ExpectRetrievedValueIsArray('diversityPolicy');
454
455 68
        return $out;
456
    }
457
458
    /**
459
    * @param array<int, string|CreativeWork> $value
460
    */
461 2
    public function SetDiversityPolicy(array $value) : void
462
    {
463 2
        $this->NudgePropertyValue('diversityPolicy', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
464 2
    }
465
466
    /**
467
    * @return array<int, string|Article>
468
    */
469 68
    public function GetDiversityStaffingReport() : array
470
    {
471
        /**
472
        * @var array<int, string|Article>
473
        */
474 68
        $out = $this->ExpectRetrievedValueIsArray('diversityStaffingReport');
475
476 68
        return $out;
477
    }
478
479
    /**
480
    * @param array<int, string|Article> $value
481
    */
482 2
    public function SetDiversityStaffingReport(array $value) : void
483
    {
484 2
        $this->NudgePropertyValue('diversityStaffingReport', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
485 2
    }
486
487
    /**
488
    * @return array<int, Person>
489
    */
490 68
    public function GetEmployee() : array
491
    {
492
        /**
493
        * @var array<int, Person>
494
        */
495 68
        $out = $this->ExpectRetrievedValueIsArray('employee');
496
497 68
        return $out;
498
    }
499
500
    /**
501
    * @param array<int, Person> $value
502
    */
503 2
    public function SetEmployee(array $value) : void
504
    {
505 2
        $this->NudgePropertyValue('employee', $value);
506 2
    }
507
508
    /**
509
    * @return array<int, string|CreativeWork>
510
    */
511 68
    public function GetEthicsPolicy() : array
512
    {
513
        /**
514
        * @var array<int, string|CreativeWork>
515
        */
516 68
        $out = $this->ExpectRetrievedValueIsArray('ethicsPolicy');
517
518 68
        return $out;
519
    }
520
521
    /**
522
    * @param array<int, string|CreativeWork> $value
523
    */
524 2
    public function SetEthicsPolicy(array $value) : void
525
    {
526 2
        $this->NudgePropertyValue('ethicsPolicy', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
527 2
    }
528
529
    /**
530
    * @return array<int, Person>
531
    */
532 68
    public function GetFounder() : array
533
    {
534
        /**
535
        * @var array<int, Person>
536
        */
537 68
        $out = $this->ExpectRetrievedValueIsArray('founder');
538
539 68
        return $out;
540
    }
541
542
    /**
543
    * @param array<int, Person> $value
544
    */
545 2
    public function SetFounder(array $value) : void
546
    {
547 2
        $this->NudgePropertyValue('founder', $value);
548 2
    }
549
550
    /**
551
    * @return array<int, Date>
552
    */
553 68
    public function GetFoundingDate() : array
554
    {
555
        /**
556
        * @var array<int, Date>
557
        */
558 68
        $out = $this->ExpectRetrievedValueIsArray('foundingDate');
559
560 68
        return $out;
561
    }
562
563
    /**
564
    * @param array<int, Date> $value
565
    */
566 2
    public function SetFoundingDate(array $value) : void
567
    {
568 2
        $this->NudgePropertyValue('foundingDate', $value);
569 2
    }
570
571
    /**
572
    * @return array<int, Place>
573
    */
574 68
    public function GetFoundingLocation() : array
575
    {
576
        /**
577
        * @var array<int, Place>
578
        */
579 68
        $out = $this->ExpectRetrievedValueIsArray('foundingLocation');
580
581 68
        return $out;
582
    }
583
584
    /**
585
    * @param array<int, Place> $value
586
    */
587 2
    public function SetFoundingLocation(array $value) : void
588
    {
589 2
        $this->NudgePropertyValue('foundingLocation', $value);
590 2
    }
591
592
    /**
593
    * @return array<int, string>
594
    */
595 68
    public function GetLegalName() : array
596
    {
597
        /**
598
        * @var array<int, string>
599
        */
600 68
        $out = $this->ExpectRetrievedValueIsArray('legalName');
601
602 68
        return $out;
603
    }
604
605
    /**
606
    * @param array<int, string> $value
607
    */
608 2
    public function SetLegalName(array $value) : void
609
    {
610 2
        $this->NudgePropertyValue('legalName', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
611 2
    }
612
613
    /**
614
    * @return array<int, string>
615
    */
616 68
    public function GetLeiCode() : array
617
    {
618
        /**
619
        * @var array<int, string>
620
        */
621 68
        $out = $this->ExpectRetrievedValueIsArray('leiCode');
622
623 68
        return $out;
624
    }
625
626
    /**
627
    * @param array<int, string> $value
628
    */
629 2
    public function SetLeiCode(array $value) : void
630
    {
631 2
        $this->NudgePropertyValue('leiCode', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
632 2
    }
633
634
    /**
635
    * @return array<int, QuantitativeValue>
636
    */
637 68
    public function GetNumberOfEmployees() : array
638
    {
639
        /**
640
        * @var array<int, QuantitativeValue>
641
        */
642 68
        $out = $this->ExpectRetrievedValueIsArray('numberOfEmployees');
643
644 68
        return $out;
645
    }
646
647
    /**
648
    * @param array<int, QuantitativeValue> $value
649
    */
650 2
    public function SetNumberOfEmployees(array $value) : void
651
    {
652 2
        $this->NudgePropertyValue('numberOfEmployees', $value);
653 2
    }
654
655
    /**
656
    * @return array<int, string|AboutPage|CreativeWork>
657
    */
658 68
    public function GetOwnershipFundingInfo() : array
659
    {
660
        /**
661
        * @var array<int, string|AboutPage|CreativeWork>
662
        */
663 68
        $out = $this->ExpectRetrievedValueIsArray('ownershipFundingInfo');
664
665 68
        return $out;
666
    }
667
668
    /**
669
    * @param array<int, string|AboutPage|CreativeWork> $value
670
    */
671 2
    public function SetOwnershipFundingInfo(array $value) : void
672
    {
673 2
        $this->NudgePropertyValue('ownershipFundingInfo', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
674 2
    }
675
676
    /**
677
    * @return array<int, Organization>
678
    */
679 68
    public function GetParentOrganization() : array
680
    {
681
        /**
682
        * @var array<int, Organization>
683
        */
684 68
        $out = $this->ExpectRetrievedValueIsArray('parentOrganization');
685
686 68
        return $out;
687
    }
688
689
    /**
690
    * @param array<int, Organization> $value
691
    */
692 2
    public function SetParentOrganization(array $value) : void
693
    {
694 2
        $this->NudgePropertyValue('parentOrganization', $value);
695 2
    }
696
697
    /**
698
    * @return array<int, Organization>
699
    */
700 68
    public function GetSubOrganization() : array
701
    {
702
        /**
703
        * @var array<int, Organization>
704
        */
705 68
        $out = $this->ExpectRetrievedValueIsArray('subOrganization');
706
707 68
        return $out;
708
    }
709
710
    /**
711
    * @param array<int, Organization> $value
712
    */
713 2
    public function SetSubOrganization(array $value) : void
714
    {
715 2
        $this->NudgePropertyValue('subOrganization', $value);
716 2
    }
717
718
    /**
719
    * @return array<int, string|CreativeWork>
720
    */
721 68
    public function GetUnnamedSourcesPolicy() : array
722
    {
723
        /**
724
        * @var array<int, string|CreativeWork>
725
        */
726 68
        $out = $this->ExpectRetrievedValueIsArray('unnamedSourcesPolicy');
727
728 68
        return $out;
729
    }
730
731
    /**
732
    * @param array<int, string|CreativeWork> $value
733
    */
734 2
    public function SetUnnamedSourcesPolicy(array $value) : void
735
    {
736 2
        $this->NudgePropertyValue('unnamedSourcesPolicy', $value, self::BOOL_DEFAULT_AUTOTRIMSTRINGS);
737 2
    }
738
}
739