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