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/DownloadAction.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\DownloadActionContract;
6
use \Spatie\SchemaOrg\Contracts\ActionContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
use \Spatie\SchemaOrg\Contracts\TransferActionContract;
9
10
/**
11
 * The act of downloading an object.
12
 *
13
 * @see http://schema.org/DownloadAction
14
 *
15
 */
16 View Code Duplication
class DownloadAction extends BaseType implements DownloadActionContract, ActionContract, ThingContract, TransferActionContract
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...
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 original location of the object or the
150
     * agent before the action.
151
     *
152
     * @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $fromLocation
153
     *
154
     * @return static
155
     *
156
     * @see http://schema.org/fromLocation
157
     */
158
    public function fromLocation($fromLocation)
159
    {
160
        return $this->setProperty('fromLocation', $fromLocation);
161
    }
162
163
    /**
164
     * The identifier property represents any kind of identifier for any kind of
165
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
166
     * dedicated properties for representing many of these, either as textual
167
     * strings or as URL (URI) links. See [background
168
     * notes](/docs/datamodel.html#identifierBg) for more details.
169
     *
170
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
171
     *
172
     * @return static
173
     *
174
     * @see http://schema.org/identifier
175
     */
176
    public function identifier($identifier)
177
    {
178
        return $this->setProperty('identifier', $identifier);
179
    }
180
181
    /**
182
     * An image of the item. This can be a [[URL]] or a fully described
183
     * [[ImageObject]].
184
     *
185
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
186
     *
187
     * @return static
188
     *
189
     * @see http://schema.org/image
190
     */
191
    public function image($image)
192
    {
193
        return $this->setProperty('image', $image);
194
    }
195
196
    /**
197
     * The object that helped the agent perform the action. e.g. John wrote a
198
     * book with *a pen*.
199
     *
200
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $instrument
201
     *
202
     * @return static
203
     *
204
     * @see http://schema.org/instrument
205
     */
206
    public function instrument($instrument)
207
    {
208
        return $this->setProperty('instrument', $instrument);
209
    }
210
211
    /**
212
     * The location of for example where the event is happening, an organization
213
     * is located, or where an action takes place.
214
     *
215
     * @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[]|\Spatie\SchemaOrg\Contracts\PostalAddressContract|\Spatie\SchemaOrg\Contracts\PostalAddressContract[]|string|string[] $location
216
     *
217
     * @return static
218
     *
219
     * @see http://schema.org/location
220
     */
221
    public function location($location)
222
    {
223
        return $this->setProperty('location', $location);
224
    }
225
226
    /**
227
     * Indicates a page (or other CreativeWork) for which this thing is the main
228
     * entity being described. See [background
229
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
230
     *
231
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
232
     *
233
     * @return static
234
     *
235
     * @see http://schema.org/mainEntityOfPage
236
     */
237
    public function mainEntityOfPage($mainEntityOfPage)
238
    {
239
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
240
    }
241
242
    /**
243
     * The name of the item.
244
     *
245
     * @param string|string[] $name
246
     *
247
     * @return static
248
     *
249
     * @see http://schema.org/name
250
     */
251
    public function name($name)
252
    {
253
        return $this->setProperty('name', $name);
254
    }
255
256
    /**
257
     * The object upon which the action is carried out, whose state is kept
258
     * intact or changed. Also known as the semantic roles patient, affected or
259
     * undergoer (which change their state) or theme (which doesn't). e.g. John
260
     * read *a book*.
261
     *
262
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $object
263
     *
264
     * @return static
265
     *
266
     * @see http://schema.org/object
267
     */
268
    public function object($object)
269
    {
270
        return $this->setProperty('object', $object);
271
    }
272
273
    /**
274
     * Other co-agents that participated in the action indirectly. e.g. John
275
     * wrote a book with *Steve*.
276
     *
277
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $participant
278
     *
279
     * @return static
280
     *
281
     * @see http://schema.org/participant
282
     */
283
    public function participant($participant)
284
    {
285
        return $this->setProperty('participant', $participant);
286
    }
287
288
    /**
289
     * Indicates a potential Action, which describes an idealized action in
290
     * which this thing would play an 'object' role.
291
     *
292
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
293
     *
294
     * @return static
295
     *
296
     * @see http://schema.org/potentialAction
297
     */
298
    public function potentialAction($potentialAction)
299
    {
300
        return $this->setProperty('potentialAction', $potentialAction);
301
    }
302
303
    /**
304
     * The result produced in the action. e.g. John wrote *a book*.
305
     *
306
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $result
307
     *
308
     * @return static
309
     *
310
     * @see http://schema.org/result
311
     */
312
    public function result($result)
313
    {
314
        return $this->setProperty('result', $result);
315
    }
316
317
    /**
318
     * URL of a reference Web page that unambiguously indicates the item's
319
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
320
     * official website.
321
     *
322
     * @param string|string[] $sameAs
323
     *
324
     * @return static
325
     *
326
     * @see http://schema.org/sameAs
327
     */
328
    public function sameAs($sameAs)
329
    {
330
        return $this->setProperty('sameAs', $sameAs);
331
    }
332
333
    /**
334
     * The startTime of something. For a reserved event or service (e.g.
335
     * FoodEstablishmentReservation), the time that it is expected to start. For
336
     * actions that span a period of time, when the action was performed. e.g.
337
     * John wrote a book from *January* to December. For media, including audio
338
     * and video, it's the time offset of the start of a clip within a larger
339
     * file.
340
     * 
341
     * Note that Event uses startDate/endDate instead of startTime/endTime, even
342
     * when describing dates with times. This situation may be clarified in
343
     * future revisions.
344
     *
345
     * @param \DateTimeInterface|\DateTimeInterface[] $startTime
346
     *
347
     * @return static
348
     *
349
     * @see http://schema.org/startTime
350
     */
351
    public function startTime($startTime)
352
    {
353
        return $this->setProperty('startTime', $startTime);
354
    }
355
356
    /**
357
     * A CreativeWork or Event about this Thing.
358
     *
359
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
360
     *
361
     * @return static
362
     *
363
     * @see http://schema.org/subjectOf
364
     */
365
    public function subjectOf($subjectOf)
366
    {
367
        return $this->setProperty('subjectOf', $subjectOf);
368
    }
369
370
    /**
371
     * Indicates a target EntryPoint for an Action.
372
     *
373
     * @param \Spatie\SchemaOrg\Contracts\EntryPointContract|\Spatie\SchemaOrg\Contracts\EntryPointContract[] $target
374
     *
375
     * @return static
376
     *
377
     * @see http://schema.org/target
378
     */
379
    public function target($target)
380
    {
381
        return $this->setProperty('target', $target);
382
    }
383
384
    /**
385
     * A sub property of location. The final location of the object or the agent
386
     * after the action.
387
     *
388
     * @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $toLocation
389
     *
390
     * @return static
391
     *
392
     * @see http://schema.org/toLocation
393
     */
394
    public function toLocation($toLocation)
395
    {
396
        return $this->setProperty('toLocation', $toLocation);
397
    }
398
399
    /**
400
     * URL of the item.
401
     *
402
     * @param string|string[] $url
403
     *
404
     * @return static
405
     *
406
     * @see http://schema.org/url
407
     */
408
    public function url($url)
409
    {
410
        return $this->setProperty('url', $url);
411
    }
412
413
}
414