ReserveAction::result()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\SchemaOrg;
4
5
use \Spatie\SchemaOrg\Contracts\ReserveActionContract;
6
use \Spatie\SchemaOrg\Contracts\ActionContract;
7
use \Spatie\SchemaOrg\Contracts\OrganizeActionContract;
8
use \Spatie\SchemaOrg\Contracts\PlanActionContract;
9
use \Spatie\SchemaOrg\Contracts\ThingContract;
10
11
/**
12
 * Reserving a concrete object.
13
 * 
14
 * Related actions:
15
 * 
16
 * * [[ScheduleAction]]</a>: Unlike ScheduleAction, ReserveAction reserves
17
 * concrete objects (e.g. a table, a hotel) towards a time slot / spatial
18
 * allocation.
19
 *
20
 * @see http://schema.org/ReserveAction
21
 *
22
 */
23 View Code Duplication
class ReserveAction extends BaseType implements ReserveActionContract, ActionContract, OrganizeActionContract, PlanActionContract, ThingContract
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
{
25
    /**
26
     * Indicates the current disposition of the Action.
27
     *
28
     * @param \Spatie\SchemaOrg\Contracts\ActionStatusTypeContract|\Spatie\SchemaOrg\Contracts\ActionStatusTypeContract[] $actionStatus
29
     *
30
     * @return static
31
     *
32
     * @see http://schema.org/actionStatus
33
     */
34
    public function actionStatus($actionStatus)
35
    {
36
        return $this->setProperty('actionStatus', $actionStatus);
37
    }
38
39
    /**
40
     * An additional type for the item, typically used for adding more specific
41
     * types from external vocabularies in microdata syntax. This is a
42
     * relationship between something and a class that the thing is in. In RDFa
43
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
44
     * attribute - for multiple types. Schema.org tools may have only weaker
45
     * understanding of extra types, in particular those defined externally.
46
     *
47
     * @param string|string[] $additionalType
48
     *
49
     * @return static
50
     *
51
     * @see http://schema.org/additionalType
52
     */
53
    public function additionalType($additionalType)
54
    {
55
        return $this->setProperty('additionalType', $additionalType);
56
    }
57
58
    /**
59
     * The direct performer or driver of the action (animate or inanimate). e.g.
60
     * *John* wrote a book.
61
     *
62
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $agent
63
     *
64
     * @return static
65
     *
66
     * @see http://schema.org/agent
67
     */
68
    public function agent($agent)
69
    {
70
        return $this->setProperty('agent', $agent);
71
    }
72
73
    /**
74
     * An alias for the item.
75
     *
76
     * @param string|string[] $alternateName
77
     *
78
     * @return static
79
     *
80
     * @see http://schema.org/alternateName
81
     */
82
    public function alternateName($alternateName)
83
    {
84
        return $this->setProperty('alternateName', $alternateName);
85
    }
86
87
    /**
88
     * A description of the item.
89
     *
90
     * @param string|string[] $description
91
     *
92
     * @return static
93
     *
94
     * @see http://schema.org/description
95
     */
96
    public function description($description)
97
    {
98
        return $this->setProperty('description', $description);
99
    }
100
101
    /**
102
     * A sub property of description. A short description of the item used to
103
     * disambiguate from other, similar items. Information from other properties
104
     * (in particular, name) may be necessary for the description to be useful
105
     * for disambiguation.
106
     *
107
     * @param string|string[] $disambiguatingDescription
108
     *
109
     * @return static
110
     *
111
     * @see http://schema.org/disambiguatingDescription
112
     */
113
    public function disambiguatingDescription($disambiguatingDescription)
114
    {
115
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
116
    }
117
118
    /**
119
     * The endTime of something. For a reserved event or service (e.g.
120
     * FoodEstablishmentReservation), the time that it is expected to end. For
121
     * actions that span a period of time, when the action was performed. e.g.
122
     * John wrote a book from January to *December*. For media, including audio
123
     * and video, it's the time offset of the end of a clip within a larger
124
     * file.
125
     * 
126
     * Note that Event uses startDate/endDate instead of startTime/endTime, even
127
     * when describing dates with times. This situation may be clarified in
128
     * future revisions.
129
     *
130
     * @param \DateTimeInterface|\DateTimeInterface[] $endTime
131
     *
132
     * @return static
133
     *
134
     * @see http://schema.org/endTime
135
     */
136
    public function endTime($endTime)
137
    {
138
        return $this->setProperty('endTime', $endTime);
139
    }
140
141
    /**
142
     * For failed actions, more information on the cause of the failure.
143
     *
144
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $error
145
     *
146
     * @return static
147
     *
148
     * @see http://schema.org/error
149
     */
150
    public function error($error)
151
    {
152
        return $this->setProperty('error', $error);
153
    }
154
155
    /**
156
     * The identifier property represents any kind of identifier for any kind of
157
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
158
     * dedicated properties for representing many of these, either as textual
159
     * strings or as URL (URI) links. See [background
160
     * notes](/docs/datamodel.html#identifierBg) for more details.
161
     *
162
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
163
     *
164
     * @return static
165
     *
166
     * @see http://schema.org/identifier
167
     */
168
    public function identifier($identifier)
169
    {
170
        return $this->setProperty('identifier', $identifier);
171
    }
172
173
    /**
174
     * An image of the item. This can be a [[URL]] or a fully described
175
     * [[ImageObject]].
176
     *
177
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
178
     *
179
     * @return static
180
     *
181
     * @see http://schema.org/image
182
     */
183
    public function image($image)
184
    {
185
        return $this->setProperty('image', $image);
186
    }
187
188
    /**
189
     * The object that helped the agent perform the action. e.g. John wrote a
190
     * book with *a pen*.
191
     *
192
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $instrument
193
     *
194
     * @return static
195
     *
196
     * @see http://schema.org/instrument
197
     */
198
    public function instrument($instrument)
199
    {
200
        return $this->setProperty('instrument', $instrument);
201
    }
202
203
    /**
204
     * The location of for example where the event is happening, an organization
205
     * is located, or where an action takes place.
206
     *
207
     * @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[]|\Spatie\SchemaOrg\Contracts\PostalAddressContract|\Spatie\SchemaOrg\Contracts\PostalAddressContract[]|string|string[] $location
208
     *
209
     * @return static
210
     *
211
     * @see http://schema.org/location
212
     */
213
    public function location($location)
214
    {
215
        return $this->setProperty('location', $location);
216
    }
217
218
    /**
219
     * Indicates a page (or other CreativeWork) for which this thing is the main
220
     * entity being described. See [background
221
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
222
     *
223
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
224
     *
225
     * @return static
226
     *
227
     * @see http://schema.org/mainEntityOfPage
228
     */
229
    public function mainEntityOfPage($mainEntityOfPage)
230
    {
231
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
232
    }
233
234
    /**
235
     * The name of the item.
236
     *
237
     * @param string|string[] $name
238
     *
239
     * @return static
240
     *
241
     * @see http://schema.org/name
242
     */
243
    public function name($name)
244
    {
245
        return $this->setProperty('name', $name);
246
    }
247
248
    /**
249
     * The object upon which the action is carried out, whose state is kept
250
     * intact or changed. Also known as the semantic roles patient, affected or
251
     * undergoer (which change their state) or theme (which doesn't). e.g. John
252
     * read *a book*.
253
     *
254
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $object
255
     *
256
     * @return static
257
     *
258
     * @see http://schema.org/object
259
     */
260
    public function object($object)
261
    {
262
        return $this->setProperty('object', $object);
263
    }
264
265
    /**
266
     * Other co-agents that participated in the action indirectly. e.g. John
267
     * wrote a book with *Steve*.
268
     *
269
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $participant
270
     *
271
     * @return static
272
     *
273
     * @see http://schema.org/participant
274
     */
275
    public function participant($participant)
276
    {
277
        return $this->setProperty('participant', $participant);
278
    }
279
280
    /**
281
     * Indicates a potential Action, which describes an idealized action in
282
     * which this thing would play an 'object' role.
283
     *
284
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
285
     *
286
     * @return static
287
     *
288
     * @see http://schema.org/potentialAction
289
     */
290
    public function potentialAction($potentialAction)
291
    {
292
        return $this->setProperty('potentialAction', $potentialAction);
293
    }
294
295
    /**
296
     * The result produced in the action. e.g. John wrote *a book*.
297
     *
298
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $result
299
     *
300
     * @return static
301
     *
302
     * @see http://schema.org/result
303
     */
304
    public function result($result)
305
    {
306
        return $this->setProperty('result', $result);
307
    }
308
309
    /**
310
     * URL of a reference Web page that unambiguously indicates the item's
311
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
312
     * official website.
313
     *
314
     * @param string|string[] $sameAs
315
     *
316
     * @return static
317
     *
318
     * @see http://schema.org/sameAs
319
     */
320
    public function sameAs($sameAs)
321
    {
322
        return $this->setProperty('sameAs', $sameAs);
323
    }
324
325
    /**
326
     * The time the object is scheduled to.
327
     *
328
     * @param \DateTimeInterface|\DateTimeInterface[] $scheduledTime
329
     *
330
     * @return static
331
     *
332
     * @see http://schema.org/scheduledTime
333
     */
334
    public function scheduledTime($scheduledTime)
335
    {
336
        return $this->setProperty('scheduledTime', $scheduledTime);
337
    }
338
339
    /**
340
     * The startTime of something. For a reserved event or service (e.g.
341
     * FoodEstablishmentReservation), the time that it is expected to start. For
342
     * actions that span a period of time, when the action was performed. e.g.
343
     * John wrote a book from *January* to December. For media, including audio
344
     * and video, it's the time offset of the start of a clip within a larger
345
     * file.
346
     * 
347
     * Note that Event uses startDate/endDate instead of startTime/endTime, even
348
     * when describing dates with times. This situation may be clarified in
349
     * future revisions.
350
     *
351
     * @param \DateTimeInterface|\DateTimeInterface[] $startTime
352
     *
353
     * @return static
354
     *
355
     * @see http://schema.org/startTime
356
     */
357
    public function startTime($startTime)
358
    {
359
        return $this->setProperty('startTime', $startTime);
360
    }
361
362
    /**
363
     * A CreativeWork or Event about this Thing.
364
     *
365
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
366
     *
367
     * @return static
368
     *
369
     * @see http://schema.org/subjectOf
370
     */
371
    public function subjectOf($subjectOf)
372
    {
373
        return $this->setProperty('subjectOf', $subjectOf);
374
    }
375
376
    /**
377
     * Indicates a target EntryPoint for an Action.
378
     *
379
     * @param \Spatie\SchemaOrg\Contracts\EntryPointContract|\Spatie\SchemaOrg\Contracts\EntryPointContract[] $target
380
     *
381
     * @return static
382
     *
383
     * @see http://schema.org/target
384
     */
385
    public function target($target)
386
    {
387
        return $this->setProperty('target', $target);
388
    }
389
390
    /**
391
     * URL of the item.
392
     *
393
     * @param string|string[] $url
394
     *
395
     * @return static
396
     *
397
     * @see http://schema.org/url
398
     */
399
    public function url($url)
400
    {
401
        return $this->setProperty('url', $url);
402
    }
403
404
}
405