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