Passed
Push — master ( df1a48...669ccb )
by SignpostMarv
04:37
created

AlignmentObject   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 154
Duplicated Lines 0 %

Test Coverage

Coverage 59.31%

Importance

Changes 0
Metric Value
eloc 53
dl 0
loc 154
ccs 35
cts 59
cp 0.5931
rs 10
c 0
b 0
f 0
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A GetEducationalFramework() 0 12 1
A SetAlignmentType() 0 6 1
A GetTargetName() 0 12 1
A GetTargetDescription() 0 12 1
A SetTargetUrl() 0 6 1
A SetEducationalFramework() 0 6 1
A GetTargetUrl() 0 12 1
A GetAlignmentType() 0 12 1
A SetTargetName() 0 6 1
A SetTargetDescription() 0 6 1
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, string> $alignmentType
14
* @property array<int, string> $educationalFramework
15
* @property array<int, string> $targetDescription
16
* @property array<int, string> $targetName
17
* @property array<int, string> $targetUrl
18
*/
19
class AlignmentObject extends Base
20
{
21
    const SCHEMA_ORG_TYPE = 'AlignmentObject';
22
23
    const PROPERTIES = [
24
        'alignmentType',
25
        'educationalFramework',
26
        'targetDescription',
27
        'targetName',
28
        'targetUrl',
29
    ];
30
31
    /**
32
    * @return array<int, string>
33
    */
34 4
    public function GetAlignmentType() : array
35
    {
36
        /**
37
        * @var array<int, string>
38
        */
39 4
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
40 4
            'alignmentType',
41 4
            $this->RetrievePropertyValueFromData('alignmentType'),
42 4
            static::class
43
        );
44
45 4
        return $out;
46
    }
47
48
    /**
49
    * @param array<int, string> $value
50
    */
51
    public function SetAlignmentType(array $value) : void
52
    {
53
        $this->NudgePropertyWithUniqueTrimmedStringsMightNotBeString(
54
            'alignmentType',
55
            __METHOD__,
56
            $value
57
        );
58
    }
59
60
    /**
61
    * @return array<int, string>
62
    */
63 4
    public function GetEducationalFramework() : array
64
    {
65
        /**
66
        * @var array<int, string>
67
        */
68 4
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
69 4
            'educationalFramework',
70 4
            $this->RetrievePropertyValueFromData('educationalFramework'),
71 4
            static::class
72
        );
73
74 4
        return $out;
75
    }
76
77
    /**
78
    * @param array<int, string> $value
79
    */
80
    public function SetEducationalFramework(array $value) : void
81
    {
82
        $this->NudgePropertyWithUniqueTrimmedStringsMightNotBeString(
83
            'educationalFramework',
84
            __METHOD__,
85
            $value
86
        );
87
    }
88
89
    /**
90
    * @return array<int, string>
91
    */
92 4
    public function GetTargetDescription() : array
93
    {
94
        /**
95
        * @var array<int, string>
96
        */
97 4
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
98 4
            'targetDescription',
99 4
            $this->RetrievePropertyValueFromData('targetDescription'),
100 4
            static::class
101
        );
102
103 4
        return $out;
104
    }
105
106
    /**
107
    * @param array<int, string> $value
108
    */
109
    public function SetTargetDescription(array $value) : void
110
    {
111
        $this->NudgePropertyWithUniqueTrimmedStringsMightNotBeString(
112
            'targetDescription',
113
            __METHOD__,
114
            $value
115
        );
116
    }
117
118
    /**
119
    * @return array<int, string>
120
    */
121 4
    public function GetTargetName() : array
122
    {
123
        /**
124
        * @var array<int, string>
125
        */
126 4
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
127 4
            'targetName',
128 4
            $this->RetrievePropertyValueFromData('targetName'),
129 4
            static::class
130
        );
131
132 4
        return $out;
133
    }
134
135
    /**
136
    * @param array<int, string> $value
137
    */
138
    public function SetTargetName(array $value) : void
139
    {
140
        $this->NudgePropertyWithUniqueTrimmedStringsMightNotBeString(
141
            'targetName',
142
            __METHOD__,
143
            $value
144
        );
145
    }
146
147
    /**
148
    * @return array<int, string>
149
    */
150 5
    public function GetTargetUrl() : array
151
    {
152
        /**
153
        * @var array<int, string>
154
        */
155 5
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
156 5
            'targetUrl',
157 5
            $this->RetrievePropertyValueFromData('targetUrl'),
158 5
            static::class
159
        );
160
161 5
        return $out;
162
    }
163
164
    /**
165
    * @param array<int, string> $value
166
    */
167 1
    public function SetTargetUrl(array $value) : void
168
    {
169 1
        $this->NudgePropertyWithUniqueTrimmedStringsMightNotBeString(
170 1
            'targetUrl',
171 1
            __METHOD__,
172 1
            $value
173
        );
174 1
    }
175
}
176