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

AlignmentObject::GetTargetName()   A

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, 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