Passed
Push — master ( b7b55a...a74c74 )
by SignpostMarv
11:14
created

Map   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 39
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A GetMapType() 0 12 1
A SetMapType() 0 5 1
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\Intangible\Enumeration\MapCategoryType;
11
use SignpostMarv\DaftObject\SchemaOrg\TypeUtilities;
12
13
/**
14
* @property array<int, MapCategoryType> $mapType
15
*/
16
class Map extends Base
17
{
18
    const SCHEMA_ORG_TYPE = 'Map';
19
20
    const PROPERTIES = [
21
        'mapType',
22
    ];
23
24
    const PROPERTIES_WITH_MULTI_TYPED_ARRAYS = [
25
        'mapType' => [
26
            MapCategoryType::class,
27
        ],
28
    ];
29
30
    /**
31
    * @return array<int, MapCategoryType>
32
    */
33 4
    public function GetMapType() : array
34
    {
35
        /**
36
        * @var array<int, MapCategoryType>
37
        */
38 4
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
39 4
            'mapType',
40 4
            $this->RetrievePropertyValueFromData('mapType'),
41 4
            static::class
42
        );
43
44 4
        return $out;
45
    }
46
47
    /**
48
    * @param array<int, MapCategoryType> $value
49
    */
50 1
    public function SetMapType(array $value) : void
51
    {
52 1
        $this->NudgePropertyValue(
53 1
            'mapType',
54 1
            $value
55
        );
56 1
    }
57
}
58