GetBroadcastFrequencyValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 12
ccs 6
cts 6
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\Intangible;
8
9
use SignpostMarv\DaftObject\SchemaOrg\Intangible as Base;
10
use SignpostMarv\DaftObject\SchemaOrg\TypeUtilities;
11
12
/**
13
* @property array<int, int|float|StructuredValue\QuantitativeValue> $broadcastFrequencyValue
14
*/
15
class BroadcastFrequencySpecification extends Base
16
{
17
    const SCHEMA_ORG_TYPE = 'BroadcastFrequencySpecification';
18
19
    const PROPERTIES = [
20
        'broadcastFrequencyValue',
21
    ];
22
23
    const PROPERTIES_WITH_MULTI_TYPED_ARRAYS = [
24
        'broadcastFrequencyValue' => [
25
            'integer',
26
            'double',
27
            StructuredValue\QuantitativeValue::class,
28
        ],
29
    ];
30
31
    /**
32
    * @return array<int, int|float|StructuredValue\QuantitativeValue>
33
    */
34 5
    public function GetBroadcastFrequencyValue() : array
35
    {
36
        /**
37
        * @var array<int, int|float|StructuredValue\QuantitativeValue>
38
        */
39 5
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
40 5
            'broadcastFrequencyValue',
41 5
            $this->RetrievePropertyValueFromData('broadcastFrequencyValue'),
42 5
            static::class
43
        );
44
45 5
        return $out;
46
    }
47
48
    /**
49
    * @param array<int, int|float|StructuredValue\QuantitativeValue> $value
50
    */
51 1
    public function SetBroadcastFrequencyValue(array $value) : void
52
    {
53 1
        $this->NudgePropertyValue(
54 1
            'broadcastFrequencyValue',
55 1
            $value
56
        );
57 1
    }
58
}
59