Issues (439)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/ExerciseAction.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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