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/PriceSpecification.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\PriceSpecificationContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\StructuredValueContract;
8
use \Spatie\SchemaOrg\Contracts\ThingContract;
9
10
/**
11
 * A structured value representing a price or price range. Typically, only the
12
 * subclasses of this type are used for markup. It is recommended to use
13
 * [[MonetaryAmount]] to describe independent amounts of money such as a salary,
14
 * credit card limits, etc.
15
 *
16
 * @see http://schema.org/PriceSpecification
17
 *
18
 */
19 View Code Duplication
class PriceSpecification extends BaseType implements PriceSpecificationContract, IntangibleContract, StructuredValueContract, 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...
20
{
21
    /**
22
     * An additional type for the item, typically used for adding more specific
23
     * types from external vocabularies in microdata syntax. This is a
24
     * relationship between something and a class that the thing is in. In RDFa
25
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
26
     * attribute - for multiple types. Schema.org tools may have only weaker
27
     * understanding of extra types, in particular those defined externally.
28
     *
29
     * @param string|string[] $additionalType
30
     *
31
     * @return static
32
     *
33
     * @see http://schema.org/additionalType
34
     */
35
    public function additionalType($additionalType)
36
    {
37
        return $this->setProperty('additionalType', $additionalType);
38
    }
39
40
    /**
41
     * An alias for the item.
42
     *
43
     * @param string|string[] $alternateName
44
     *
45
     * @return static
46
     *
47
     * @see http://schema.org/alternateName
48
     */
49
    public function alternateName($alternateName)
50
    {
51
        return $this->setProperty('alternateName', $alternateName);
52
    }
53
54
    /**
55
     * A description of the item.
56
     *
57
     * @param string|string[] $description
58
     *
59
     * @return static
60
     *
61
     * @see http://schema.org/description
62
     */
63
    public function description($description)
64
    {
65
        return $this->setProperty('description', $description);
66
    }
67
68
    /**
69
     * A sub property of description. A short description of the item used to
70
     * disambiguate from other, similar items. Information from other properties
71
     * (in particular, name) may be necessary for the description to be useful
72
     * for disambiguation.
73
     *
74
     * @param string|string[] $disambiguatingDescription
75
     *
76
     * @return static
77
     *
78
     * @see http://schema.org/disambiguatingDescription
79
     */
80
    public function disambiguatingDescription($disambiguatingDescription)
81
    {
82
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
83
    }
84
85
    /**
86
     * The interval and unit of measurement of ordering quantities for which the
87
     * offer or price specification is valid. This allows e.g. specifying that a
88
     * certain freight charge is valid only for a certain quantity.
89
     *
90
     * @param \Spatie\SchemaOrg\Contracts\QuantitativeValueContract|\Spatie\SchemaOrg\Contracts\QuantitativeValueContract[] $eligibleQuantity
91
     *
92
     * @return static
93
     *
94
     * @see http://schema.org/eligibleQuantity
95
     */
96
    public function eligibleQuantity($eligibleQuantity)
97
    {
98
        return $this->setProperty('eligibleQuantity', $eligibleQuantity);
99
    }
100
101
    /**
102
     * The transaction volume, in a monetary unit, for which the offer or price
103
     * specification is valid, e.g. for indicating a minimal purchasing volume,
104
     * to express free shipping above a certain order volume, or to limit the
105
     * acceptance of credit cards to purchases to a certain minimal amount.
106
     *
107
     * @param \Spatie\SchemaOrg\Contracts\PriceSpecificationContract|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract[] $eligibleTransactionVolume
108
     *
109
     * @return static
110
     *
111
     * @see http://schema.org/eligibleTransactionVolume
112
     */
113
    public function eligibleTransactionVolume($eligibleTransactionVolume)
114
    {
115
        return $this->setProperty('eligibleTransactionVolume', $eligibleTransactionVolume);
116
    }
117
118
    /**
119
     * The identifier property represents any kind of identifier for any kind of
120
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
121
     * dedicated properties for representing many of these, either as textual
122
     * strings or as URL (URI) links. See [background
123
     * notes](/docs/datamodel.html#identifierBg) for more details.
124
     *
125
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
126
     *
127
     * @return static
128
     *
129
     * @see http://schema.org/identifier
130
     */
131
    public function identifier($identifier)
132
    {
133
        return $this->setProperty('identifier', $identifier);
134
    }
135
136
    /**
137
     * An image of the item. This can be a [[URL]] or a fully described
138
     * [[ImageObject]].
139
     *
140
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
141
     *
142
     * @return static
143
     *
144
     * @see http://schema.org/image
145
     */
146
    public function image($image)
147
    {
148
        return $this->setProperty('image', $image);
149
    }
150
151
    /**
152
     * Indicates a page (or other CreativeWork) for which this thing is the main
153
     * entity being described. See [background
154
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
155
     *
156
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
157
     *
158
     * @return static
159
     *
160
     * @see http://schema.org/mainEntityOfPage
161
     */
162
    public function mainEntityOfPage($mainEntityOfPage)
163
    {
164
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
165
    }
166
167
    /**
168
     * The highest price if the price is a range.
169
     *
170
     * @param float|float[]|int|int[] $maxPrice
171
     *
172
     * @return static
173
     *
174
     * @see http://schema.org/maxPrice
175
     */
176
    public function maxPrice($maxPrice)
177
    {
178
        return $this->setProperty('maxPrice', $maxPrice);
179
    }
180
181
    /**
182
     * The lowest price if the price is a range.
183
     *
184
     * @param float|float[]|int|int[] $minPrice
185
     *
186
     * @return static
187
     *
188
     * @see http://schema.org/minPrice
189
     */
190
    public function minPrice($minPrice)
191
    {
192
        return $this->setProperty('minPrice', $minPrice);
193
    }
194
195
    /**
196
     * The name of the item.
197
     *
198
     * @param string|string[] $name
199
     *
200
     * @return static
201
     *
202
     * @see http://schema.org/name
203
     */
204
    public function name($name)
205
    {
206
        return $this->setProperty('name', $name);
207
    }
208
209
    /**
210
     * Indicates a potential Action, which describes an idealized action in
211
     * which this thing would play an 'object' role.
212
     *
213
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
214
     *
215
     * @return static
216
     *
217
     * @see http://schema.org/potentialAction
218
     */
219
    public function potentialAction($potentialAction)
220
    {
221
        return $this->setProperty('potentialAction', $potentialAction);
222
    }
223
224
    /**
225
     * The offer price of a product, or of a price component when attached to
226
     * PriceSpecification and its subtypes.
227
     * 
228
     * Usage guidelines:
229
     * 
230
     * * Use the [[priceCurrency]] property (with standard formats: [ISO 4217
231
     * currency format](http://en.wikipedia.org/wiki/ISO_4217) e.g. "USD";
232
     * [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies)
233
     * for cryptocurrencies e.g. "BTC"; well known names for [Local Exchange
234
     * Tradings
235
     * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
236
     * (LETS) and other currency types e.g. "Ithaca HOUR") instead of including
237
     * [ambiguous
238
     * symbols](http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign)
239
     * such as '$' in the value.
240
     * * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a
241
     * decimal point. Avoid using these symbols as a readability separator.
242
     * * Note that both
243
     * [RDFa](http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute)
244
     * and Microdata syntax allow the use of a "content=" attribute for
245
     * publishing simple machine-readable values alongside more human-friendly
246
     * formatting.
247
     * * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT
248
     * NINE' (U+0039)) rather than superficially similiar Unicode symbols.
249
     *
250
     * @param float|float[]|int|int[]|string|string[] $price
251
     *
252
     * @return static
253
     *
254
     * @see http://schema.org/price
255
     */
256
    public function price($price)
257
    {
258
        return $this->setProperty('price', $price);
259
    }
260
261
    /**
262
     * The currency of the price, or a price component when attached to
263
     * [[PriceSpecification]] and its subtypes.
264
     * 
265
     * Use standard formats: [ISO 4217 currency
266
     * format](http://en.wikipedia.org/wiki/ISO_4217) e.g. "USD"; [Ticker
267
     * symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for
268
     * cryptocurrencies e.g. "BTC"; well known names for [Local Exchange
269
     * Tradings
270
     * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
271
     * (LETS) and other currency types e.g. "Ithaca HOUR".
272
     *
273
     * @param string|string[] $priceCurrency
274
     *
275
     * @return static
276
     *
277
     * @see http://schema.org/priceCurrency
278
     */
279
    public function priceCurrency($priceCurrency)
280
    {
281
        return $this->setProperty('priceCurrency', $priceCurrency);
282
    }
283
284
    /**
285
     * URL of a reference Web page that unambiguously indicates the item's
286
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
287
     * official website.
288
     *
289
     * @param string|string[] $sameAs
290
     *
291
     * @return static
292
     *
293
     * @see http://schema.org/sameAs
294
     */
295
    public function sameAs($sameAs)
296
    {
297
        return $this->setProperty('sameAs', $sameAs);
298
    }
299
300
    /**
301
     * A CreativeWork or Event about this Thing.
302
     *
303
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
304
     *
305
     * @return static
306
     *
307
     * @see http://schema.org/subjectOf
308
     */
309
    public function subjectOf($subjectOf)
310
    {
311
        return $this->setProperty('subjectOf', $subjectOf);
312
    }
313
314
    /**
315
     * URL of the item.
316
     *
317
     * @param string|string[] $url
318
     *
319
     * @return static
320
     *
321
     * @see http://schema.org/url
322
     */
323
    public function url($url)
324
    {
325
        return $this->setProperty('url', $url);
326
    }
327
328
    /**
329
     * The date when the item becomes valid.
330
     *
331
     * @param \DateTimeInterface|\DateTimeInterface[] $validFrom
332
     *
333
     * @return static
334
     *
335
     * @see http://schema.org/validFrom
336
     */
337
    public function validFrom($validFrom)
338
    {
339
        return $this->setProperty('validFrom', $validFrom);
340
    }
341
342
    /**
343
     * The date after when the item is not valid. For example the end of an
344
     * offer, salary period, or a period of opening hours.
345
     *
346
     * @param \DateTimeInterface|\DateTimeInterface[] $validThrough
347
     *
348
     * @return static
349
     *
350
     * @see http://schema.org/validThrough
351
     */
352
    public function validThrough($validThrough)
353
    {
354
        return $this->setProperty('validThrough', $validThrough);
355
    }
356
357
    /**
358
     * Specifies whether the applicable value-added tax (VAT) is included in the
359
     * price specification or not.
360
     *
361
     * @param bool|bool[] $valueAddedTaxIncluded
362
     *
363
     * @return static
364
     *
365
     * @see http://schema.org/valueAddedTaxIncluded
366
     */
367
    public function valueAddedTaxIncluded($valueAddedTaxIncluded)
368
    {
369
        return $this->setProperty('valueAddedTaxIncluded', $valueAddedTaxIncluded);
370
    }
371
372
}
373