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