SoftwareApplication::SetAvailableOnDevice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
ccs 5
cts 5
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\CreativeWork;
8
9
use SignpostMarv\DaftObject\SchemaOrg\CreativeWork as Base;
10
use SignpostMarv\DaftObject\SchemaOrg\TypeUtilities;
11
12
/**
13
* @property array<int, string> $applicationCategory
14
* @property array<int, string> $applicationSubCategory
15
* @property array<int, string> $applicationSuite
16
* @property array<int, string> $availableOnDevice
17
* @property array<int, string> $countriesNotSupported
18
* @property array<int, string> $countriesSupported
19
* @property array<int, string> $downloadUrl
20
* @property array<int, string> $featureList
21
* @property array<int, string> $fileSize
22
* @property array<int, string> $installUrl
23
* @property array<int, string> $memoryRequirements
24
* @property array<int, string> $operatingSystem
25
* @property array<int, string> $permissions
26
* @property array<int, string> $processorRequirements
27
* @property array<int, string> $releaseNotes
28
* @property array<int, string|MediaObject\ImageObject> $screenshot
29
* @property array<int, SoftwareApplication> $softwareAddOn
30
* @property array<int, Base> $softwareHelp
31
* @property array<int, string> $softwareRequirements
32
* @property array<int, string> $softwareVersion
33
* @property array<int, string> $storageRequirements
34
* @property array<int, Dataset\DataFeed> $supportingData
35
*/
36
class SoftwareApplication extends Base
37
{
38
    const SCHEMA_ORG_TYPE = 'SoftwareApplication';
39
40
    const PROPERTIES = [
41
        'applicationCategory',
42
        'applicationSubCategory',
43
        'applicationSuite',
44
        'availableOnDevice',
45
        'countriesNotSupported',
46
        'countriesSupported',
47
        'downloadUrl',
48
        'featureList',
49
        'fileSize',
50
        'installUrl',
51
        'memoryRequirements',
52
        'operatingSystem',
53
        'permissions',
54
        'processorRequirements',
55
        'releaseNotes',
56
        'screenshot',
57
        'softwareAddOn',
58
        'softwareHelp',
59
        'softwareRequirements',
60
        'softwareVersion',
61
        'storageRequirements',
62
        'supportingData',
63
    ];
64
65
    const PROPERTIES_WITH_MULTI_TYPED_ARRAYS = [
66
        'applicationCategory' => [
67
            'string',
68
        ],
69
        'applicationSubCategory' => [
70
            'string',
71
        ],
72
        'applicationSuite' => [
73
            'string',
74
        ],
75
        'availableOnDevice' => [
76
            'string',
77
        ],
78
        'countriesNotSupported' => [
79
            'string',
80
        ],
81
        'countriesSupported' => [
82
            'string',
83
        ],
84
        'downloadUrl' => [
85
            'string',
86
        ],
87
        'featureList' => [
88
            'string',
89
        ],
90
        'fileSize' => [
91
            'string',
92
        ],
93
        'installUrl' => [
94
            'string',
95
        ],
96
        'memoryRequirements' => [
97
            'string',
98
        ],
99
        'operatingSystem' => [
100
            'string',
101
        ],
102
        'permissions' => [
103
            'string',
104
        ],
105
        'processorRequirements' => [
106
            'string',
107
        ],
108
        'releaseNotes' => [
109
            'string',
110
        ],
111
        'screenshot' => [
112
            'string',
113
            MediaObject\ImageObject::class,
114
        ],
115
        'softwareAddOn' => [
116
            SoftwareApplication::class,
117
        ],
118
        'softwareHelp' => [
119
            Base::class,
120
        ],
121
        'softwareRequirements' => [
122
            'string',
123
        ],
124
        'softwareVersion' => [
125
            'string',
126
        ],
127
        'storageRequirements' => [
128
            'string',
129
        ],
130
        'supportingData' => [
131
            Dataset\DataFeed::class,
132
        ],
133
    ];
134
135
    /**
136
    * @return array<int, string>
137
    */
138 6
    public function GetApplicationCategory() : array
139
    {
140
        /**
141
        * @var array<int, string>
142
        */
143 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
144 6
            'applicationCategory',
145 6
            $this->RetrievePropertyValueFromData('applicationCategory'),
146 6
            static::class
147
        );
148
149 6
        return $out;
150
    }
151
152
    /**
153
    * @param array<int, string> $value
154
    */
155 1
    public function SetApplicationCategory(array $value) : void
156
    {
157 1
        $this->NudgePropertyValue(
158 1
            'applicationCategory',
159 1
            $value,
160 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
161
        );
162 1
    }
163
164
    /**
165
    * @return array<int, string>
166
    */
167 6
    public function GetApplicationSubCategory() : array
168
    {
169
        /**
170
        * @var array<int, string>
171
        */
172 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
173 6
            'applicationSubCategory',
174 6
            $this->RetrievePropertyValueFromData('applicationSubCategory'),
175 6
            static::class
176
        );
177
178 6
        return $out;
179
    }
180
181
    /**
182
    * @param array<int, string> $value
183
    */
184 1
    public function SetApplicationSubCategory(array $value) : void
185
    {
186 1
        $this->NudgePropertyValue(
187 1
            'applicationSubCategory',
188 1
            $value,
189 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
190
        );
191 1
    }
192
193
    /**
194
    * @return array<int, string>
195
    */
196 6
    public function GetApplicationSuite() : array
197
    {
198
        /**
199
        * @var array<int, string>
200
        */
201 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
202 6
            'applicationSuite',
203 6
            $this->RetrievePropertyValueFromData('applicationSuite'),
204 6
            static::class
205
        );
206
207 6
        return $out;
208
    }
209
210
    /**
211
    * @param array<int, string> $value
212
    */
213 1
    public function SetApplicationSuite(array $value) : void
214
    {
215 1
        $this->NudgePropertyValue(
216 1
            'applicationSuite',
217 1
            $value,
218 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
219
        );
220 1
    }
221
222
    /**
223
    * @return array<int, string>
224
    */
225 6
    public function GetAvailableOnDevice() : array
226
    {
227
        /**
228
        * @var array<int, string>
229
        */
230 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
231 6
            'availableOnDevice',
232 6
            $this->RetrievePropertyValueFromData('availableOnDevice'),
233 6
            static::class
234
        );
235
236 6
        return $out;
237
    }
238
239
    /**
240
    * @param array<int, string> $value
241
    */
242 1
    public function SetAvailableOnDevice(array $value) : void
243
    {
244 1
        $this->NudgePropertyValue(
245 1
            'availableOnDevice',
246 1
            $value,
247 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
248
        );
249 1
    }
250
251
    /**
252
    * @return array<int, string>
253
    */
254 6
    public function GetCountriesNotSupported() : array
255
    {
256
        /**
257
        * @var array<int, string>
258
        */
259 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
260 6
            'countriesNotSupported',
261 6
            $this->RetrievePropertyValueFromData('countriesNotSupported'),
262 6
            static::class
263
        );
264
265 6
        return $out;
266
    }
267
268
    /**
269
    * @param array<int, string> $value
270
    */
271 1
    public function SetCountriesNotSupported(array $value) : void
272
    {
273 1
        $this->NudgePropertyValue(
274 1
            'countriesNotSupported',
275 1
            $value,
276 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
277
        );
278 1
    }
279
280
    /**
281
    * @return array<int, string>
282
    */
283 6
    public function GetCountriesSupported() : array
284
    {
285
        /**
286
        * @var array<int, string>
287
        */
288 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
289 6
            'countriesSupported',
290 6
            $this->RetrievePropertyValueFromData('countriesSupported'),
291 6
            static::class
292
        );
293
294 6
        return $out;
295
    }
296
297
    /**
298
    * @param array<int, string> $value
299
    */
300 1
    public function SetCountriesSupported(array $value) : void
301
    {
302 1
        $this->NudgePropertyValue(
303 1
            'countriesSupported',
304 1
            $value,
305 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
306
        );
307 1
    }
308
309
    /**
310
    * @return array<int, string>
311
    */
312 6
    public function GetDownloadUrl() : array
313
    {
314
        /**
315
        * @var array<int, string>
316
        */
317 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
318 6
            'downloadUrl',
319 6
            $this->RetrievePropertyValueFromData('downloadUrl'),
320 6
            static::class
321
        );
322
323 6
        return $out;
324
    }
325
326
    /**
327
    * @param array<int, string> $value
328
    */
329 1
    public function SetDownloadUrl(array $value) : void
330
    {
331 1
        $this->NudgePropertyValue(
332 1
            'downloadUrl',
333 1
            $value,
334 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
335
        );
336 1
    }
337
338
    /**
339
    * @return array<int, string>
340
    */
341 6
    public function GetFeatureList() : array
342
    {
343
        /**
344
        * @var array<int, string>
345
        */
346 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
347 6
            'featureList',
348 6
            $this->RetrievePropertyValueFromData('featureList'),
349 6
            static::class
350
        );
351
352 6
        return $out;
353
    }
354
355
    /**
356
    * @param array<int, string> $value
357
    */
358 1
    public function SetFeatureList(array $value) : void
359
    {
360 1
        $this->NudgePropertyValue(
361 1
            'featureList',
362 1
            $value,
363 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
364
        );
365 1
    }
366
367
    /**
368
    * @return array<int, string>
369
    */
370 6
    public function GetFileSize() : array
371
    {
372
        /**
373
        * @var array<int, string>
374
        */
375 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
376 6
            'fileSize',
377 6
            $this->RetrievePropertyValueFromData('fileSize'),
378 6
            static::class
379
        );
380
381 6
        return $out;
382
    }
383
384
    /**
385
    * @param array<int, string> $value
386
    */
387 1
    public function SetFileSize(array $value) : void
388
    {
389 1
        $this->NudgePropertyValue(
390 1
            'fileSize',
391 1
            $value,
392 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
393
        );
394 1
    }
395
396
    /**
397
    * @return array<int, string>
398
    */
399 6
    public function GetInstallUrl() : array
400
    {
401
        /**
402
        * @var array<int, string>
403
        */
404 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
405 6
            'installUrl',
406 6
            $this->RetrievePropertyValueFromData('installUrl'),
407 6
            static::class
408
        );
409
410 6
        return $out;
411
    }
412
413
    /**
414
    * @param array<int, string> $value
415
    */
416 1
    public function SetInstallUrl(array $value) : void
417
    {
418 1
        $this->NudgePropertyValue(
419 1
            'installUrl',
420 1
            $value,
421 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
422
        );
423 1
    }
424
425
    /**
426
    * @return array<int, string>
427
    */
428 6
    public function GetMemoryRequirements() : array
429
    {
430
        /**
431
        * @var array<int, string>
432
        */
433 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
434 6
            'memoryRequirements',
435 6
            $this->RetrievePropertyValueFromData('memoryRequirements'),
436 6
            static::class
437
        );
438
439 6
        return $out;
440
    }
441
442
    /**
443
    * @param array<int, string> $value
444
    */
445 1
    public function SetMemoryRequirements(array $value) : void
446
    {
447 1
        $this->NudgePropertyValue(
448 1
            'memoryRequirements',
449 1
            $value,
450 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
451
        );
452 1
    }
453
454
    /**
455
    * @return array<int, string>
456
    */
457 6
    public function GetOperatingSystem() : array
458
    {
459
        /**
460
        * @var array<int, string>
461
        */
462 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
463 6
            'operatingSystem',
464 6
            $this->RetrievePropertyValueFromData('operatingSystem'),
465 6
            static::class
466
        );
467
468 6
        return $out;
469
    }
470
471
    /**
472
    * @param array<int, string> $value
473
    */
474 1
    public function SetOperatingSystem(array $value) : void
475
    {
476 1
        $this->NudgePropertyValue(
477 1
            'operatingSystem',
478 1
            $value,
479 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
480
        );
481 1
    }
482
483
    /**
484
    * @return array<int, string>
485
    */
486 6
    public function GetPermissions() : array
487
    {
488
        /**
489
        * @var array<int, string>
490
        */
491 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
492 6
            'permissions',
493 6
            $this->RetrievePropertyValueFromData('permissions'),
494 6
            static::class
495
        );
496
497 6
        return $out;
498
    }
499
500
    /**
501
    * @param array<int, string> $value
502
    */
503 1
    public function SetPermissions(array $value) : void
504
    {
505 1
        $this->NudgePropertyValue(
506 1
            'permissions',
507 1
            $value,
508 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
509
        );
510 1
    }
511
512
    /**
513
    * @return array<int, string>
514
    */
515 6
    public function GetProcessorRequirements() : array
516
    {
517
        /**
518
        * @var array<int, string>
519
        */
520 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
521 6
            'processorRequirements',
522 6
            $this->RetrievePropertyValueFromData('processorRequirements'),
523 6
            static::class
524
        );
525
526 6
        return $out;
527
    }
528
529
    /**
530
    * @param array<int, string> $value
531
    */
532 1
    public function SetProcessorRequirements(array $value) : void
533
    {
534 1
        $this->NudgePropertyValue(
535 1
            'processorRequirements',
536 1
            $value,
537 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
538
        );
539 1
    }
540
541
    /**
542
    * @return array<int, string>
543
    */
544 6
    public function GetReleaseNotes() : array
545
    {
546
        /**
547
        * @var array<int, string>
548
        */
549 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
550 6
            'releaseNotes',
551 6
            $this->RetrievePropertyValueFromData('releaseNotes'),
552 6
            static::class
553
        );
554
555 6
        return $out;
556
    }
557
558
    /**
559
    * @param array<int, string> $value
560
    */
561 1
    public function SetReleaseNotes(array $value) : void
562
    {
563 1
        $this->NudgePropertyValue(
564 1
            'releaseNotes',
565 1
            $value,
566 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
567
        );
568 1
    }
569
570
    /**
571
    * @return array<int, string|MediaObject\ImageObject>
572
    */
573 6
    public function GetScreenshot() : array
574
    {
575
        /**
576
        * @var array<int, string|MediaObject\ImageObject>
577
        */
578 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
579 6
            'screenshot',
580 6
            $this->RetrievePropertyValueFromData('screenshot'),
581 6
            static::class
582
        );
583
584 6
        return $out;
585
    }
586
587
    /**
588
    * @param array<int, string|MediaObject\ImageObject> $value
589
    */
590 1
    public function SetScreenshot(array $value) : void
591
    {
592 1
        $this->NudgePropertyValue(
593 1
            'screenshot',
594 1
            $value,
595 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
596
        );
597 1
    }
598
599
    /**
600
    * @return array<int, SoftwareApplication>
601
    */
602 6
    public function GetSoftwareAddOn() : array
603
    {
604
        /**
605
        * @var array<int, SoftwareApplication>
606
        */
607 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
608 6
            'softwareAddOn',
609 6
            $this->RetrievePropertyValueFromData('softwareAddOn'),
610 6
            static::class
611
        );
612
613 6
        return $out;
614
    }
615
616
    /**
617
    * @param array<int, SoftwareApplication> $value
618
    */
619 1
    public function SetSoftwareAddOn(array $value) : void
620
    {
621 1
        $this->NudgePropertyValue(
622 1
            'softwareAddOn',
623 1
            $value
624
        );
625 1
    }
626
627
    /**
628
    * @return array<int, Base>
629
    */
630 6
    public function GetSoftwareHelp() : array
631
    {
632
        /**
633
        * @var array<int, Base>
634
        */
635 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
636 6
            'softwareHelp',
637 6
            $this->RetrievePropertyValueFromData('softwareHelp'),
638 6
            static::class
639
        );
640
641 6
        return $out;
642
    }
643
644
    /**
645
    * @param array<int, Base> $value
646
    */
647 1
    public function SetSoftwareHelp(array $value) : void
648
    {
649 1
        $this->NudgePropertyValue(
650 1
            'softwareHelp',
651 1
            $value
652
        );
653 1
    }
654
655
    /**
656
    * @return array<int, string>
657
    */
658 6
    public function GetSoftwareRequirements() : array
659
    {
660
        /**
661
        * @var array<int, string>
662
        */
663 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
664 6
            'softwareRequirements',
665 6
            $this->RetrievePropertyValueFromData('softwareRequirements'),
666 6
            static::class
667
        );
668
669 6
        return $out;
670
    }
671
672
    /**
673
    * @param array<int, string> $value
674
    */
675 1
    public function SetSoftwareRequirements(array $value) : void
676
    {
677 1
        $this->NudgePropertyValue(
678 1
            'softwareRequirements',
679 1
            $value,
680 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
681
        );
682 1
    }
683
684
    /**
685
    * @return array<int, string>
686
    */
687 6
    public function GetSoftwareVersion() : array
688
    {
689
        /**
690
        * @var array<int, string>
691
        */
692 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
693 6
            'softwareVersion',
694 6
            $this->RetrievePropertyValueFromData('softwareVersion'),
695 6
            static::class
696
        );
697
698 6
        return $out;
699
    }
700
701
    /**
702
    * @param array<int, string> $value
703
    */
704 1
    public function SetSoftwareVersion(array $value) : void
705
    {
706 1
        $this->NudgePropertyValue(
707 1
            'softwareVersion',
708 1
            $value,
709 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
710
        );
711 1
    }
712
713
    /**
714
    * @return array<int, string>
715
    */
716 6
    public function GetStorageRequirements() : array
717
    {
718
        /**
719
        * @var array<int, string>
720
        */
721 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
722 6
            'storageRequirements',
723 6
            $this->RetrievePropertyValueFromData('storageRequirements'),
724 6
            static::class
725
        );
726
727 6
        return $out;
728
    }
729
730
    /**
731
    * @param array<int, string> $value
732
    */
733 1
    public function SetStorageRequirements(array $value) : void
734
    {
735 1
        $this->NudgePropertyValue(
736 1
            'storageRequirements',
737 1
            $value,
738 1
            self::BOOL_DEFAULT_AUTOTRIMSTRINGS
739
        );
740 1
    }
741
742
    /**
743
    * @return array<int, Dataset\DataFeed>
744
    */
745 6
    public function GetSupportingData() : array
746
    {
747
        /**
748
        * @var array<int, Dataset\DataFeed>
749
        */
750 6
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
751 6
            'supportingData',
752 6
            $this->RetrievePropertyValueFromData('supportingData'),
753 6
            static::class
754
        );
755
756 6
        return $out;
757
    }
758
759
    /**
760
    * @param array<int, Dataset\DataFeed> $value
761
    */
762 1
    public function SetSupportingData(array $value) : void
763
    {
764 1
        $this->NudgePropertyValue(
765 1
            'supportingData',
766 1
            $value
767
        );
768 1
    }
769
}
770