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