Test Failed
Branch master (16bdc1)
by SignpostMarv
02:18
created

Event::GetEventStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 8
ccs 2
cts 2
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\Review;
10
use SignpostMarv\DaftObject\SchemaOrg\DataTypes\Date;
11
use SignpostMarv\DaftObject\SchemaOrg\DataTypes\DateTime;
12
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Enumeration\EventStatusType;
13
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Language;
14
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Quantity\Duration;
15
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Rating\AggregateRating;
16
use SignpostMarv\DaftObject\SchemaOrg\Intangible\StructuredValue\ContactPoint\PostalAddress;
17
18
/**
19
* @property array<int, Thing> $about
20
* @property array<int, Person> $actor
21
* @property array<int, AggregateRating> $aggregateRating
22
* @property array<int, Organization|Person> $attendee
23
* @property array<int, Audience> $audience
24
* @property array<int, Organization|Person> $composer
25
* @property array<int, Organization|Person> $contributor
26
* @property array<int, Person> $director
27
* @property array<int, DateTime> $doorTime
28
* @property array<int, Duration> $duration
29
* @property array<int, Date|DateTime> $endDate
30
* @property array<int, EventStatusType> $eventStatus
31
* @property array<int, Organization|Person> $funder
32
* @property array<int, string|Language> $inLanguage
33
* @property array<int, bool> $isAccessibleForFree
34
* @property array<int, string|Place|PostalAddress> $location
35
* @property array<int, Organization|Person> $maximumAttendeeCapacity
36
* @property array<int, Offer> $offers
37
* @property array<int, Organization|Person> $organizer
38
* @property array<int, Organization|Person> $performer
39
* @property array<int, Date> $previousStartDate
40
* @property array<int, CreativeWork> $recordedIn
41
* @property array<int, int> $remainingAttendeeCapacity
42
* @property array<int, Review> $review
43
* @property array<int, Organization|Person> $sponsor
44
* @property array<int, Date> $startDate
45
* @property array<int, Event> $subEvent
46
* @property array<int, Event> $superEvent
47
* @property array<int, Organization|Person> $translator
48
* @property array<int, string> $typicalAgeRange
49
* @property array<int, CreativeWork> $workFeatured
50
* @property array<int, CreativeWork> $workPerformed
51
*/
52
class Event extends Thing
53
{
54
    use DaftObjectTraits\About;
55
    use DaftObjectTraits\HasActor;
56
    use DaftObjectTraits\HasAggregateRating;
57
    use DaftObjectTraits\HasAudience;
58
    use DaftObjectTraits\Composer;
59
    use DaftObjectTraits\Contributor;
60
    use DaftObjectTraits\HasDirector;
61
    use DaftObjectTraits\Duration;
62
    use DaftObjectTraits\HasFunder;
63
    use DaftObjectTraits\HasInLanguage;
64
    use DaftObjectTraits\HasIsAccessibleForFree;
65
    use DaftObjectTraits\HasLocation;
66
    use DaftObjectTraits\MaximumAttendeeCapacity;
67
    use DaftObjectTraits\HasOffers;
68
    use DaftObjectTraits\HasReview;
69
    use DaftObjectTraits\HasSponsors;
70
    use DaftObjectTraits\HasTranslators;
71
    use DaftObjectTraits\HasTypicalAgeRanges;
72
73
    const SCHEMA_ORG_TYPE = 'Event';
74
75
    const PROPERTIES = [
76
        'about',
77
        'actor',
78
        'aggregateRating',
79
        'attendee',
80
        'audience',
81
        'composer',
82
        'contributor',
83
        'director',
84
        'doorTime',
85
        'duration',
86
        'endDate',
87
        'eventStatus',
88
        'funder',
89
        'inLanguage',
90
        'isAccessibleForFree',
91
        'location',
92
        'maximumAttendeeCapacity',
93
        'offers',
94
        'organizer',
95
        'performer',
96
        'previousStartDate',
97
        'recordedIn',
98
        'remainingAttendeeCapacity',
99
        'review',
100
        'sponsor',
101
        'startDate',
102
        'subEvent',
103
        'superEvent',
104
        'translator',
105
        'typicalAgeRange',
106
        'workFeatured',
107
        'workPerformed',
108
    ];
109
110
    const PROPERTIES_WITH_MULTI_TYPED_ARRAYS = [
111
        'about' => [
112
            Thing::class,
113
        ],
114
        'actor' => [
115
            Person::class,
116
        ],
117
        'aggregateRating' => [
118
            AggregateRating::class,
119
        ],
120
        'attendee' => [
121
            Organization::class,
122
            Person::class,
123
        ],
124
        'audience' => [
125
            Audience::class,
126
        ],
127
        'composer' => [
128
            Organization::class,
129
            Person::class,
130
        ],
131
        'contributor' => [
132
            Organization::class,
133
            Person::class,
134
        ],
135
        'director' => [
136
            Person::class,
137
        ],
138
        'doorTime' => [
139
            DateTime::class,
140
        ],
141
        'duration' => [
142
            Duration::class,
143
        ],
144
        'endDate' => [
145
            Date::class,
146
            DateTime::class,
147
        ],
148
        'eventStatus' => [
149
            EventStatusType::class,
150
        ],
151
        'funder' => [
152
            Organization::class,
153
            Person::class,
154
        ],
155
        'inLanguage' => [
156
            'string',
157
            Language::class,
158
        ],
159
        'isAccessibleForFree' => [
160
            'boolean',
161
        ],
162
        'location' => [
163
            'string',
164
            Place::class,
165
            PostalAddress::class,
166
        ],
167
        'maximumAttendeeCapacity' => [
168
            Organization::class,
169
            Person::class,
170
        ],
171
        'offers' => [
172
            Offer::class,
173
        ],
174
        'organizer' => [
175
            Organization::class,
176
            Person::class,
177
        ],
178
        'performer' => [
179
            Organization::class,
180
            Person::class,
181
        ],
182
        'previousStartDate' => [
183
            Date::class,
184
        ],
185
        'recordedIn' => [
186
            CreativeWork::class,
187
        ],
188
        'remainingAttendeeCapacity' => [
189
            'integer',
190
        ],
191
        'review' => [
192
            Review::class,
193
        ],
194
        'sponsor' => [
195
            Organization::class,
196
            Person::class,
197
        ],
198
        'startDate' => [
199
            Date::class,
200
        ],
201
        'subEvent' => [
202
            Event::class,
203
        ],
204
        'superEvent' => [
205
            Event::class,
206
        ],
207
        'translator' => [
208
            Organization::class,
209
            Person::class,
210
        ],
211
        'typicalAgeRange' => [
212
            'string',
213
        ],
214
        'workFeatured' => [
215
            CreativeWork::class,
216
        ],
217
        'workPerformed' => [
218
            CreativeWork::class,
219
        ],
220
    ];
221
222
    /**
223 262
    * @return array<int, Organization|Person>
224
    */
225
    public function GetAttendee() : array
226
    {
227
        /**
228 262
        * @var array<int, Organization|Person>
229
        */
230 262
        $out = $this->ExpectRetrievedValueIsArray('attendee');
231
232
        return $out;
233
    }
234
235
    /**
236 3
    * @param array<int, Organization|Person> $value
237
    */
238 3
    public function SetAttendee(array $value) : void
239 3
    {
240
        $this->NudgePropertyValue('attendee', $value);
241
    }
242
243
    /**
244 262
    * @return array<int, DateTime>
245
    */
246
    public function GetDoorTime() : array
247
    {
248
        /**
249 262
        * @var array<int, DateTime>
250
        */
251 262
        $out = $this->ExpectRetrievedValueIsArray('doorTime');
252
253
        return $out;
254
    }
255
256
    /**
257 3
    * @param array<int, DateTime> $value
258
    */
259 3
    public function SetDoorTime(array $value) : void
260 3
    {
261
        $this->NudgePropertyValue('doorTime', $value);
262
    }
263
264
    /**
265 262
    * @return array<int, Date|DateTime>
266
    */
267
    public function GetEndDate() : array
268
    {
269
        /**
270 262
        * @var array<int, Date|DateTime>
271
        */
272 262
        $out = $this->ExpectRetrievedValueIsArray('endDate');
273
274
        return $out;
275
    }
276
277
    /**
278 3
    * @param array<int, Date|DateTime> $value
279
    */
280 3
    public function SetEndDate(array $value) : void
281 3
    {
282
        $this->NudgePropertyValue('endDate', $value);
283
    }
284
285
    /**
286 262
    * @return array<int, EventStatusType>
287
    */
288
    public function GetEventStatus() : array
289
    {
290
        /**
291 262
        * @var array<int, EventStatusType>
292
        */
293 262
        $out = $this->ExpectRetrievedValueIsArray('eventStatus');
294
295
        return $out;
296
    }
297
298
    /**
299 3
    * @param array<int, EventStatusType> $value
300
    */
301 3
    public function SetEventStatus(array $value) : void
302 3
    {
303
        $this->NudgePropertyValue('eventStatus', $value);
304
    }
305
306
    /**
307 262
    * @return array<int, Organization|Person>
308
    */
309
    public function GetOrganizer() : array
310
    {
311
        /**
312 262
        * @var array<int, Organization|Person>
313
        */
314 262
        $out = $this->ExpectRetrievedValueIsArray('organizer');
315
316
        return $out;
317
    }
318
319
    /**
320 3
    * @param array<int, Organization|Person> $value
321
    */
322 3
    public function SetOrganizer(array $value) : void
323 3
    {
324
        $this->NudgePropertyValue('organizer', $value);
325
    }
326
327
    /**
328 262
    * @return array<int, Organization|Person>
329
    */
330
    public function GetPerformer() : array
331
    {
332
        /**
333 262
        * @var array<int, Organization|Person>
334
        */
335 262
        $out = $this->ExpectRetrievedValueIsArray('performer');
336
337
        return $out;
338
    }
339
340
    /**
341 3
    * @param array<int, Organization|Person> $value
342
    */
343 3
    public function SetPerformer(array $value) : void
344 3
    {
345
        $this->NudgePropertyValue('performer', $value);
346
    }
347
348
    /**
349 262
    * @return array<int, Date>
350
    */
351
    public function GetPreviousStartDate() : array
352
    {
353
        /**
354 262
        * @var array<int, Date>
355
        */
356 262
        $out = $this->ExpectRetrievedValueIsArray('previousStartDate');
357
358
        return $out;
359
    }
360
361
    /**
362 3
    * @param array<int, Date> $value
363
    */
364 3
    public function SetPreviousStartDate(array $value) : void
365 3
    {
366
        $this->NudgePropertyValue('previousStartDate', $value);
367
    }
368
369
    /**
370 262
    * @return array<int, CreativeWork>
371
    */
372
    public function GetRecordedIn() : array
373
    {
374
        /**
375 262
        * @var array<int, CreativeWork>
376
        */
377 262
        $out = $this->ExpectRetrievedValueIsArray('recordedIn');
378
379
        return $out;
380
    }
381
382
    /**
383 3
    * @param array<int, CreativeWork> $value
384
    */
385 3
    public function SetRecordedIn(array $value) : void
386 3
    {
387
        $this->NudgePropertyValue('recordedIn', $value);
388
    }
389
390
    /**
391 262
    * @return array<int, int>
392
    */
393
    public function GetRemainingAttendeeCapacity() : array
394
    {
395
        /**
396 262
        * @var array<int, int>
397
        */
398 262
        $out = $this->ExpectRetrievedValueIsArray('remainingAttendeeCapacity');
399
400
        return $out;
401
    }
402
403
    /**
404 3
    * @param array<int, int> $value
405
    */
406 3
    public function SetRemainingAttendeeCapacity(array $value) : void
407 3
    {
408
        $this->NudgePropertyValue('remainingAttendeeCapacity', $value);
409
    }
410
411
    /**
412 262
    * @return array<int, Date>
413
    */
414
    public function GetStartDate() : array
415
    {
416
        /**
417 262
        * @var array<int, Date>
418
        */
419 262
        $out = $this->ExpectRetrievedValueIsArray('startDate');
420
421
        return $out;
422
    }
423
424
    /**
425 3
    * @param array<int, Date> $value
426
    */
427 3
    public function SetStartDate(array $value) : void
428 3
    {
429
        $this->NudgePropertyValue('startDate', $value);
430
    }
431
432
    /**
433 262
    * @return array<int, Event>
434
    */
435
    public function GetSubEvent() : array
436
    {
437
        /**
438 262
        * @var array<int, Event>
439
        */
440 262
        $out = $this->ExpectRetrievedValueIsArray('subEvent');
441
442
        return $out;
443
    }
444
445
    /**
446 3
    * @param array<int, Event> $value
447
    */
448 3
    public function SetSubEvent(array $value) : void
449 3
    {
450
        $this->NudgePropertyValue('subEvent', $value);
451
    }
452
453
    /**
454 262
    * @return array<int, Event>
455
    */
456
    public function GetSuperEvent() : array
457
    {
458
        /**
459 262
        * @var array<int, Event>
460
        */
461 262
        $out = $this->ExpectRetrievedValueIsArray('superEvent');
462
463
        return $out;
464
    }
465
466
    /**
467 3
    * @param array<int, Event> $value
468
    */
469 3
    public function SetSuperEvent(array $value) : void
470 3
    {
471
        $this->NudgePropertyValue('superEvent', $value);
472
    }
473
474
    /**
475 262
    * @return array<int, CreativeWork>
476
    */
477
    public function GetWorkFeatured() : array
478
    {
479
        /**
480 262
        * @var array<int, CreativeWork>
481
        */
482 262
        $out = $this->ExpectRetrievedValueIsArray('workFeatured');
483
484
        return $out;
485
    }
486
487
    /**
488 3
    * @param array<int, CreativeWork> $value
489
    */
490 3
    public function SetWorkFeatured(array $value) : void
491 3
    {
492
        $this->NudgePropertyValue('workFeatured', $value);
493
    }
494
495
    /**
496 262
    * @return array<int, CreativeWork>
497
    */
498
    public function GetWorkPerformed() : array
499
    {
500
        /**
501 262
        * @var array<int, CreativeWork>
502
        */
503 262
        $out = $this->ExpectRetrievedValueIsArray('workPerformed');
504
505
        return $out;
506
    }
507
508
    /**
509 3
    * @param array<int, CreativeWork> $value
510
    */
511 3
    public function SetWorkPerformed(array $value) : void
512 3
    {
513
        $this->NudgePropertyValue('workPerformed', $value);
514
    }
515
}
516