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/SellAction.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\SellActionContract;
6
use \Spatie\SchemaOrg\Contracts\ActionContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
use \Spatie\SchemaOrg\Contracts\TradeActionContract;
9
10
/**
11
 * The act of taking money from a buyer in exchange for goods or services
12
 * rendered. An agent sells an object, product, or service to a buyer for a
13
 * price. Reciprocal of BuyAction.
14
 *
15
 * @see http://schema.org/SellAction
16
 *
17
 */
18 View Code Duplication
class SellAction extends BaseType implements SellActionContract, ActionContract, ThingContract, TradeActionContract
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...
19
{
20
    /**
21
     * Indicates the current disposition of the Action.
22
     *
23
     * @param \Spatie\SchemaOrg\Contracts\ActionStatusTypeContract|\Spatie\SchemaOrg\Contracts\ActionStatusTypeContract[] $actionStatus
24
     *
25
     * @return static
26
     *
27
     * @see http://schema.org/actionStatus
28
     */
29
    public function actionStatus($actionStatus)
30
    {
31
        return $this->setProperty('actionStatus', $actionStatus);
32
    }
33
34
    /**
35
     * An additional type for the item, typically used for adding more specific
36
     * types from external vocabularies in microdata syntax. This is a
37
     * relationship between something and a class that the thing is in. In RDFa
38
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
39
     * attribute - for multiple types. Schema.org tools may have only weaker
40
     * understanding of extra types, in particular those defined externally.
41
     *
42
     * @param string|string[] $additionalType
43
     *
44
     * @return static
45
     *
46
     * @see http://schema.org/additionalType
47
     */
48
    public function additionalType($additionalType)
49
    {
50
        return $this->setProperty('additionalType', $additionalType);
51
    }
52
53
    /**
54
     * The direct performer or driver of the action (animate or inanimate). e.g.
55
     * *John* wrote a book.
56
     *
57
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $agent
58
     *
59
     * @return static
60
     *
61
     * @see http://schema.org/agent
62
     */
63
    public function agent($agent)
64
    {
65
        return $this->setProperty('agent', $agent);
66
    }
67
68
    /**
69
     * An alias for the item.
70
     *
71
     * @param string|string[] $alternateName
72
     *
73
     * @return static
74
     *
75
     * @see http://schema.org/alternateName
76
     */
77
    public function alternateName($alternateName)
78
    {
79
        return $this->setProperty('alternateName', $alternateName);
80
    }
81
82
    /**
83
     * A sub property of participant. The participant/person/organization that
84
     * bought the object.
85
     *
86
     * @param \Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $buyer
87
     *
88
     * @return static
89
     *
90
     * @see http://schema.org/buyer
91
     */
92
    public function buyer($buyer)
93
    {
94
        return $this->setProperty('buyer', $buyer);
95
    }
96
97
    /**
98
     * A description of the item.
99
     *
100
     * @param string|string[] $description
101
     *
102
     * @return static
103
     *
104
     * @see http://schema.org/description
105
     */
106
    public function description($description)
107
    {
108
        return $this->setProperty('description', $description);
109
    }
110
111
    /**
112
     * A sub property of description. A short description of the item used to
113
     * disambiguate from other, similar items. Information from other properties
114
     * (in particular, name) may be necessary for the description to be useful
115
     * for disambiguation.
116
     *
117
     * @param string|string[] $disambiguatingDescription
118
     *
119
     * @return static
120
     *
121
     * @see http://schema.org/disambiguatingDescription
122
     */
123
    public function disambiguatingDescription($disambiguatingDescription)
124
    {
125
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
126
    }
127
128
    /**
129
     * The endTime of something. For a reserved event or service (e.g.
130
     * FoodEstablishmentReservation), the time that it is expected to end. For
131
     * actions that span a period of time, when the action was performed. e.g.
132
     * John wrote a book from January to *December*. For media, including audio
133
     * and video, it's the time offset of the end of a clip within a larger
134
     * file.
135
     * 
136
     * Note that Event uses startDate/endDate instead of startTime/endTime, even
137
     * when describing dates with times. This situation may be clarified in
138
     * future revisions.
139
     *
140
     * @param \DateTimeInterface|\DateTimeInterface[] $endTime
141
     *
142
     * @return static
143
     *
144
     * @see http://schema.org/endTime
145
     */
146
    public function endTime($endTime)
147
    {
148
        return $this->setProperty('endTime', $endTime);
149
    }
150
151
    /**
152
     * For failed actions, more information on the cause of the failure.
153
     *
154
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $error
155
     *
156
     * @return static
157
     *
158
     * @see http://schema.org/error
159
     */
160
    public function error($error)
161
    {
162
        return $this->setProperty('error', $error);
163
    }
164
165
    /**
166
     * The identifier property represents any kind of identifier for any kind of
167
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
168
     * dedicated properties for representing many of these, either as textual
169
     * strings or as URL (URI) links. See [background
170
     * notes](/docs/datamodel.html#identifierBg) for more details.
171
     *
172
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
173
     *
174
     * @return static
175
     *
176
     * @see http://schema.org/identifier
177
     */
178
    public function identifier($identifier)
179
    {
180
        return $this->setProperty('identifier', $identifier);
181
    }
182
183
    /**
184
     * An image of the item. This can be a [[URL]] or a fully described
185
     * [[ImageObject]].
186
     *
187
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
188
     *
189
     * @return static
190
     *
191
     * @see http://schema.org/image
192
     */
193
    public function image($image)
194
    {
195
        return $this->setProperty('image', $image);
196
    }
197
198
    /**
199
     * The object that helped the agent perform the action. e.g. John wrote a
200
     * book with *a pen*.
201
     *
202
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $instrument
203
     *
204
     * @return static
205
     *
206
     * @see http://schema.org/instrument
207
     */
208
    public function instrument($instrument)
209
    {
210
        return $this->setProperty('instrument', $instrument);
211
    }
212
213
    /**
214
     * The location of for example where the event is happening, an organization
215
     * is located, or where an action takes place.
216
     *
217
     * @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[]|\Spatie\SchemaOrg\Contracts\PostalAddressContract|\Spatie\SchemaOrg\Contracts\PostalAddressContract[]|string|string[] $location
218
     *
219
     * @return static
220
     *
221
     * @see http://schema.org/location
222
     */
223
    public function location($location)
224
    {
225
        return $this->setProperty('location', $location);
226
    }
227
228
    /**
229
     * Indicates a page (or other CreativeWork) for which this thing is the main
230
     * entity being described. See [background
231
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
232
     *
233
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
234
     *
235
     * @return static
236
     *
237
     * @see http://schema.org/mainEntityOfPage
238
     */
239
    public function mainEntityOfPage($mainEntityOfPage)
240
    {
241
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
242
    }
243
244
    /**
245
     * The name of the item.
246
     *
247
     * @param string|string[] $name
248
     *
249
     * @return static
250
     *
251
     * @see http://schema.org/name
252
     */
253
    public function name($name)
254
    {
255
        return $this->setProperty('name', $name);
256
    }
257
258
    /**
259
     * The object upon which the action is carried out, whose state is kept
260
     * intact or changed. Also known as the semantic roles patient, affected or
261
     * undergoer (which change their state) or theme (which doesn't). e.g. John
262
     * read *a book*.
263
     *
264
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $object
265
     *
266
     * @return static
267
     *
268
     * @see http://schema.org/object
269
     */
270
    public function object($object)
271
    {
272
        return $this->setProperty('object', $object);
273
    }
274
275
    /**
276
     * Other co-agents that participated in the action indirectly. e.g. John
277
     * wrote a book with *Steve*.
278
     *
279
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $participant
280
     *
281
     * @return static
282
     *
283
     * @see http://schema.org/participant
284
     */
285
    public function participant($participant)
286
    {
287
        return $this->setProperty('participant', $participant);
288
    }
289
290
    /**
291
     * Indicates a potential Action, which describes an idealized action in
292
     * which this thing would play an 'object' role.
293
     *
294
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
295
     *
296
     * @return static
297
     *
298
     * @see http://schema.org/potentialAction
299
     */
300
    public function potentialAction($potentialAction)
301
    {
302
        return $this->setProperty('potentialAction', $potentialAction);
303
    }
304
305
    /**
306
     * The offer price of a product, or of a price component when attached to
307
     * PriceSpecification and its subtypes.
308
     * 
309
     * Usage guidelines:
310
     * 
311
     * * Use the [[priceCurrency]] property (with standard formats: [ISO 4217
312
     * currency format](http://en.wikipedia.org/wiki/ISO_4217) e.g. "USD";
313
     * [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies)
314
     * for cryptocurrencies e.g. "BTC"; well known names for [Local Exchange
315
     * Tradings
316
     * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
317
     * (LETS) and other currency types e.g. "Ithaca HOUR") instead of including
318
     * [ambiguous
319
     * symbols](http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign)
320
     * such as '$' in the value.
321
     * * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a
322
     * decimal point. Avoid using these symbols as a readability separator.
323
     * * Note that both
324
     * [RDFa](http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute)
325
     * and Microdata syntax allow the use of a "content=" attribute for
326
     * publishing simple machine-readable values alongside more human-friendly
327
     * formatting.
328
     * * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT
329
     * NINE' (U+0039)) rather than superficially similiar Unicode symbols.
330
     *
331
     * @param float|float[]|int|int[]|string|string[] $price
332
     *
333
     * @return static
334
     *
335
     * @see http://schema.org/price
336
     */
337
    public function price($price)
338
    {
339
        return $this->setProperty('price', $price);
340
    }
341
342
    /**
343
     * The currency of the price, or a price component when attached to
344
     * [[PriceSpecification]] and its subtypes.
345
     * 
346
     * Use standard formats: [ISO 4217 currency
347
     * format](http://en.wikipedia.org/wiki/ISO_4217) e.g. "USD"; [Ticker
348
     * symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for
349
     * cryptocurrencies e.g. "BTC"; well known names for [Local Exchange
350
     * Tradings
351
     * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
352
     * (LETS) and other currency types e.g. "Ithaca HOUR".
353
     *
354
     * @param string|string[] $priceCurrency
355
     *
356
     * @return static
357
     *
358
     * @see http://schema.org/priceCurrency
359
     */
360
    public function priceCurrency($priceCurrency)
361
    {
362
        return $this->setProperty('priceCurrency', $priceCurrency);
363
    }
364
365
    /**
366
     * One or more detailed price specifications, indicating the unit price and
367
     * delivery or payment charges.
368
     *
369
     * @param \Spatie\SchemaOrg\Contracts\PriceSpecificationContract|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract[] $priceSpecification
370
     *
371
     * @return static
372
     *
373
     * @see http://schema.org/priceSpecification
374
     */
375
    public function priceSpecification($priceSpecification)
376
    {
377
        return $this->setProperty('priceSpecification', $priceSpecification);
378
    }
379
380
    /**
381
     * The result produced in the action. e.g. John wrote *a book*.
382
     *
383
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $result
384
     *
385
     * @return static
386
     *
387
     * @see http://schema.org/result
388
     */
389
    public function result($result)
390
    {
391
        return $this->setProperty('result', $result);
392
    }
393
394
    /**
395
     * URL of a reference Web page that unambiguously indicates the item's
396
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
397
     * official website.
398
     *
399
     * @param string|string[] $sameAs
400
     *
401
     * @return static
402
     *
403
     * @see http://schema.org/sameAs
404
     */
405
    public function sameAs($sameAs)
406
    {
407
        return $this->setProperty('sameAs', $sameAs);
408
    }
409
410
    /**
411
     * The startTime of something. For a reserved event or service (e.g.
412
     * FoodEstablishmentReservation), the time that it is expected to start. For
413
     * actions that span a period of time, when the action was performed. e.g.
414
     * John wrote a book from *January* to December. For media, including audio
415
     * and video, it's the time offset of the start of a clip within a larger
416
     * file.
417
     * 
418
     * Note that Event uses startDate/endDate instead of startTime/endTime, even
419
     * when describing dates with times. This situation may be clarified in
420
     * future revisions.
421
     *
422
     * @param \DateTimeInterface|\DateTimeInterface[] $startTime
423
     *
424
     * @return static
425
     *
426
     * @see http://schema.org/startTime
427
     */
428
    public function startTime($startTime)
429
    {
430
        return $this->setProperty('startTime', $startTime);
431
    }
432
433
    /**
434
     * A CreativeWork or Event about this Thing.
435
     *
436
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
437
     *
438
     * @return static
439
     *
440
     * @see http://schema.org/subjectOf
441
     */
442
    public function subjectOf($subjectOf)
443
    {
444
        return $this->setProperty('subjectOf', $subjectOf);
445
    }
446
447
    /**
448
     * Indicates a target EntryPoint for an Action.
449
     *
450
     * @param \Spatie\SchemaOrg\Contracts\EntryPointContract|\Spatie\SchemaOrg\Contracts\EntryPointContract[] $target
451
     *
452
     * @return static
453
     *
454
     * @see http://schema.org/target
455
     */
456
    public function target($target)
457
    {
458
        return $this->setProperty('target', $target);
459
    }
460
461
    /**
462
     * URL of the item.
463
     *
464
     * @param string|string[] $url
465
     *
466
     * @return static
467
     *
468
     * @see http://schema.org/url
469
     */
470
    public function url($url)
471
    {
472
        return $this->setProperty('url', $url);
473
    }
474
475
    /**
476
     * The warranty promise(s) included in the offer.
477
     *
478
     * @param \Spatie\SchemaOrg\Contracts\WarrantyPromiseContract|\Spatie\SchemaOrg\Contracts\WarrantyPromiseContract[] $warrantyPromise
479
     *
480
     * @return static
481
     *
482
     * @see http://schema.org/warrantyPromise
483
     */
484
    public function warrantyPromise($warrantyPromise)
485
    {
486
        return $this->setProperty('warrantyPromise', $warrantyPromise);
487
    }
488
489
}
490