HasGeospatialGeometry   A
last analyzed

Complexity

Total Complexity 20

Size/Duplication

Total Lines 281
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 82
dl 0
loc 281
ccs 109
cts 109
cp 1
rs 10
c 0
b 0
f 0
wmc 20

20 Methods

Rating   Name   Duplication   Size   Complexity  
A GetGeospatiallyContains() 0 12 1
A GetGeospatiallyIntersects() 0 12 1
A SetGeospatiallyIntersects() 0 5 1
A SetGeospatiallyCrosses() 0 5 1
A GetGeospatiallyCrosses() 0 12 1
A GetGeospatiallyCovers() 0 12 1
A SetGeospatiallyOverlaps() 0 5 1
A SetGeospatiallyCovers() 0 5 1
A GetGeospatiallyTouches() 0 12 1
A GetGeospatiallyWithin() 0 12 1
A SetGeospatiallyTouches() 0 5 1
A GetGeospatiallyCoveredBy() 0 12 1
A SetGeospatiallyContains() 0 5 1
A GetGeospatiallyDisjoint() 0 12 1
A SetGeospatiallyEquals() 0 5 1
A SetGeospatiallyWithin() 0 5 1
A GetGeospatiallyEquals() 0 12 1
A GetGeospatiallyOverlaps() 0 12 1
A SetGeospatiallyCoveredBy() 0 5 1
A SetGeospatiallyDisjoint() 0 5 1
1
<?php
2
/**
3
* @author SignpostMarv
4
*/
5
declare(strict_types=1);
6
7
namespace SignpostMarv\DaftObject\SchemaOrg\DaftObjectTraits;
8
9
use SignpostMarv\DaftObject\SchemaOrg\Intangible\GeospatialGeometry;
10
use SignpostMarv\DaftObject\SchemaOrg\Place;
11
use SignpostMarv\DaftObject\SchemaOrg\TypeUtilities;
12
13
trait HasGeospatialGeometry
14
{
15
    use DaftObjectTrait;
16
17
    /**
18
    * @return array<int, GeospatialGeometry|Place>
19
    */
20 64
    public function GetGeospatiallyContains() : array
21
    {
22
        /**
23
        * @var array<int, GeospatialGeometry|Place>
24
        */
25 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
26 64
            'geospatiallyContains',
27 64
            $this->RetrievePropertyValueFromData('geospatiallyContains'),
28 64
            static::class
29
        );
30
31 64
        return $out;
32
    }
33
34
    /**
35
    * @param array<int, GeospatialGeometry|Place> $value
36
    */
37 3
    public function SetGeospatiallyContains(array $value) : void
38
    {
39 3
        $this->NudgePropertyValue(
40 3
            'geospatiallyContains',
41 3
            $value
42
        );
43 3
    }
44
45
    /**
46
    * @return array<int, GeospatialGeometry|Place>
47
    */
48 64
    public function GetGeospatiallyCoveredBy() : array
49
    {
50
        /**
51
        * @var array<int, GeospatialGeometry|Place>
52
        */
53 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
54 64
            'geospatiallyCoveredBy',
55 64
            $this->RetrievePropertyValueFromData('geospatiallyCoveredBy'),
56 64
            static::class
57
        );
58
59 64
        return $out;
60
    }
61
62
    /**
63
    * @param array<int, GeospatialGeometry|Place> $value
64
    */
65 3
    public function SetGeospatiallyCoveredBy(array $value) : void
66
    {
67 3
        $this->NudgePropertyValue(
68 3
            'geospatiallyCoveredBy',
69 3
            $value
70
        );
71 3
    }
72
73
    /**
74
    * @return array<int, GeospatialGeometry|Place>
75
    */
76 64
    public function GetGeospatiallyCovers() : array
77
    {
78
        /**
79
        * @var array<int, GeospatialGeometry|Place>
80
        */
81 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
82 64
            'geospatiallyCovers',
83 64
            $this->RetrievePropertyValueFromData('geospatiallyCovers'),
84 64
            static::class
85
        );
86
87 64
        return $out;
88
    }
89
90
    /**
91
    * @param array<int, GeospatialGeometry|Place> $value
92
    */
93 3
    public function SetGeospatiallyCovers(array $value) : void
94
    {
95 3
        $this->NudgePropertyValue(
96 3
            'geospatiallyCovers',
97 3
            $value
98
        );
99 3
    }
100
101
    /**
102
    * @return array<int, GeospatialGeometry|Place>
103
    */
104 64
    public function GetGeospatiallyCrosses() : array
105
    {
106
        /**
107
        * @var array<int, GeospatialGeometry|Place>
108
        */
109 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
110 64
            'geospatiallyCrosses',
111 64
            $this->RetrievePropertyValueFromData('geospatiallyCrosses'),
112 64
            static::class
113
        );
114
115 64
        return $out;
116
    }
117
118
    /**
119
    * @param array<int, GeospatialGeometry|Place> $value
120
    */
121 3
    public function SetGeospatiallyCrosses(array $value) : void
122
    {
123 3
        $this->NudgePropertyValue(
124 3
            'geospatiallyCrosses',
125 3
            $value
126
        );
127 3
    }
128
129
    /**
130
    * @return array<int, GeospatialGeometry|Place>
131
    */
132 64
    public function GetGeospatiallyDisjoint() : array
133
    {
134
        /**
135
        * @var array<int, GeospatialGeometry|Place>
136
        */
137 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
138 64
            'geospatiallyDisjoint',
139 64
            $this->RetrievePropertyValueFromData('geospatiallyDisjoint'),
140 64
            static::class
141
        );
142
143 64
        return $out;
144
    }
145
146
    /**
147
    * @param array<int, GeospatialGeometry|Place> $value
148
    */
149 3
    public function SetGeospatiallyDisjoint(array $value) : void
150
    {
151 3
        $this->NudgePropertyValue(
152 3
            'geospatiallyDisjoint',
153 3
            $value
154
        );
155 3
    }
156
157
    /**
158
    * @return array<int, GeospatialGeometry|Place>
159
    */
160 64
    public function GetGeospatiallyEquals() : array
161
    {
162
        /**
163
        * @var array<int, GeospatialGeometry|Place>
164
        */
165 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
166 64
            'geospatiallyEquals',
167 64
            $this->RetrievePropertyValueFromData('geospatiallyEquals'),
168 64
            static::class
169
        );
170
171 64
        return $out;
172
    }
173
174
    /**
175
    * @param array<int, GeospatialGeometry|Place> $value
176
    */
177 3
    public function SetGeospatiallyEquals(array $value) : void
178
    {
179 3
        $this->NudgePropertyValue(
180 3
            'geospatiallyEquals',
181 3
            $value
182
        );
183 3
    }
184
185
    /**
186
    * @return array<int, GeospatialGeometry|Place>
187
    */
188 64
    public function GetGeospatiallyIntersects() : array
189
    {
190
        /**
191
        * @var array<int, GeospatialGeometry|Place>
192
        */
193 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
194 64
            'geospatiallyIntersects',
195 64
            $this->RetrievePropertyValueFromData('geospatiallyIntersects'),
196 64
            static::class
197
        );
198
199 64
        return $out;
200
    }
201
202
    /**
203
    * @param array<int, GeospatialGeometry|Place> $value
204
    */
205 3
    public function SetGeospatiallyIntersects(array $value) : void
206
    {
207 3
        $this->NudgePropertyValue(
208 3
            'geospatiallyIntersects',
209 3
            $value
210
        );
211 3
    }
212
213
    /**
214
    * @return array<int, GeospatialGeometry|Place>
215
    */
216 64
    public function GetGeospatiallyOverlaps() : array
217
    {
218
        /**
219
        * @var array<int, GeospatialGeometry|Place>
220
        */
221 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
222 64
            'geospatiallyOverlaps',
223 64
            $this->RetrievePropertyValueFromData('geospatiallyOverlaps'),
224 64
            static::class
225
        );
226
227 64
        return $out;
228
    }
229
230
    /**
231
    * @param array<int, GeospatialGeometry|Place> $value
232
    */
233 3
    public function SetGeospatiallyOverlaps(array $value) : void
234
    {
235 3
        $this->NudgePropertyValue(
236 3
            'geospatiallyOverlaps',
237 3
            $value
238
        );
239 3
    }
240
241
    /**
242
    * @return array<int, GeospatialGeometry|Place>
243
    */
244 64
    public function GetGeospatiallyTouches() : array
245
    {
246
        /**
247
        * @var array<int, GeospatialGeometry|Place>
248
        */
249 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
250 64
            'geospatiallyTouches',
251 64
            $this->RetrievePropertyValueFromData('geospatiallyTouches'),
252 64
            static::class
253
        );
254
255 64
        return $out;
256
    }
257
258
    /**
259
    * @param array<int, GeospatialGeometry|Place> $value
260
    */
261 3
    public function SetGeospatiallyTouches(array $value) : void
262
    {
263 3
        $this->NudgePropertyValue(
264 3
            'geospatiallyTouches',
265 3
            $value
266
        );
267 3
    }
268
269
    /**
270
    * @return array<int, GeospatialGeometry|Place>
271
    */
272 64
    public function GetGeospatiallyWithin() : array
273
    {
274
        /**
275
        * @var array<int, GeospatialGeometry|Place>
276
        */
277 64
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
278 64
            'geospatiallyWithin',
279 64
            $this->RetrievePropertyValueFromData('geospatiallyWithin'),
280 64
            static::class
281
        );
282
283 64
        return $out;
284
    }
285
286
    /**
287
    * @param array<int, GeospatialGeometry|Place> $value
288
    */
289 3
    public function SetGeospatiallyWithin(array $value) : void
290
    {
291 3
        $this->NudgePropertyValue(
292 3
            'geospatiallyWithin',
293 3
            $value
294
        );
295 3
    }
296
}
297