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