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