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