This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
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\OrderContract; |
||
6 | use \Spatie\SchemaOrg\Contracts\IntangibleContract; |
||
7 | use \Spatie\SchemaOrg\Contracts\ThingContract; |
||
8 | |||
9 | /** |
||
10 | * An order is a confirmation of a transaction (a receipt), which can contain |
||
11 | * multiple line items, each represented by an Offer that has been accepted by |
||
12 | * the customer. |
||
13 | * |
||
14 | * @see http://schema.org/Order |
||
15 | * |
||
16 | */ |
||
17 | View Code Duplication | class Order extends BaseType implements OrderContract, IntangibleContract, ThingContract |
|
0 ignored issues
–
show
|
|||
18 | { |
||
19 | /** |
||
20 | * The offer(s) -- e.g., product, quantity and price combinations -- |
||
21 | * included in the order. |
||
22 | * |
||
23 | * @param \Spatie\SchemaOrg\Contracts\OfferContract|\Spatie\SchemaOrg\Contracts\OfferContract[] $acceptedOffer |
||
24 | * |
||
25 | * @return static |
||
26 | * |
||
27 | * @see http://schema.org/acceptedOffer |
||
28 | */ |
||
29 | public function acceptedOffer($acceptedOffer) |
||
30 | { |
||
31 | return $this->setProperty('acceptedOffer', $acceptedOffer); |
||
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 | * An alias for the item. |
||
55 | * |
||
56 | * @param string|string[] $alternateName |
||
57 | * |
||
58 | * @return static |
||
59 | * |
||
60 | * @see http://schema.org/alternateName |
||
61 | */ |
||
62 | public function alternateName($alternateName) |
||
63 | { |
||
64 | return $this->setProperty('alternateName', $alternateName); |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * The billing address for the order. |
||
69 | * |
||
70 | * @param \Spatie\SchemaOrg\Contracts\PostalAddressContract|\Spatie\SchemaOrg\Contracts\PostalAddressContract[] $billingAddress |
||
71 | * |
||
72 | * @return static |
||
73 | * |
||
74 | * @see http://schema.org/billingAddress |
||
75 | */ |
||
76 | public function billingAddress($billingAddress) |
||
77 | { |
||
78 | return $this->setProperty('billingAddress', $billingAddress); |
||
79 | } |
||
80 | |||
81 | /** |
||
82 | * An entity that arranges for an exchange between a buyer and a seller. In |
||
83 | * most cases a broker never acquires or releases ownership of a product or |
||
84 | * service involved in an exchange. If it is not clear whether an entity is |
||
85 | * a broker, seller, or buyer, the latter two terms are preferred. |
||
86 | * |
||
87 | * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $broker |
||
88 | * |
||
89 | * @return static |
||
90 | * |
||
91 | * @see http://schema.org/broker |
||
92 | */ |
||
93 | public function broker($broker) |
||
94 | { |
||
95 | return $this->setProperty('broker', $broker); |
||
96 | } |
||
97 | |||
98 | /** |
||
99 | * A number that confirms the given order or payment has been received. |
||
100 | * |
||
101 | * @param string|string[] $confirmationNumber |
||
102 | * |
||
103 | * @return static |
||
104 | * |
||
105 | * @see http://schema.org/confirmationNumber |
||
106 | */ |
||
107 | public function confirmationNumber($confirmationNumber) |
||
108 | { |
||
109 | return $this->setProperty('confirmationNumber', $confirmationNumber); |
||
110 | } |
||
111 | |||
112 | /** |
||
113 | * Party placing the order or paying the invoice. |
||
114 | * |
||
115 | * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $customer |
||
116 | * |
||
117 | * @return static |
||
118 | * |
||
119 | * @see http://schema.org/customer |
||
120 | */ |
||
121 | public function customer($customer) |
||
122 | { |
||
123 | return $this->setProperty('customer', $customer); |
||
124 | } |
||
125 | |||
126 | /** |
||
127 | * A description of the item. |
||
128 | * |
||
129 | * @param string|string[] $description |
||
130 | * |
||
131 | * @return static |
||
132 | * |
||
133 | * @see http://schema.org/description |
||
134 | */ |
||
135 | public function description($description) |
||
136 | { |
||
137 | return $this->setProperty('description', $description); |
||
138 | } |
||
139 | |||
140 | /** |
||
141 | * A sub property of description. A short description of the item used to |
||
142 | * disambiguate from other, similar items. Information from other properties |
||
143 | * (in particular, name) may be necessary for the description to be useful |
||
144 | * for disambiguation. |
||
145 | * |
||
146 | * @param string|string[] $disambiguatingDescription |
||
147 | * |
||
148 | * @return static |
||
149 | * |
||
150 | * @see http://schema.org/disambiguatingDescription |
||
151 | */ |
||
152 | public function disambiguatingDescription($disambiguatingDescription) |
||
153 | { |
||
154 | return $this->setProperty('disambiguatingDescription', $disambiguatingDescription); |
||
155 | } |
||
156 | |||
157 | /** |
||
158 | * Any discount applied (to an Order). |
||
159 | * |
||
160 | * @param float|float[]|int|int[]|string|string[] $discount |
||
161 | * |
||
162 | * @return static |
||
163 | * |
||
164 | * @see http://schema.org/discount |
||
165 | */ |
||
166 | public function discount($discount) |
||
167 | { |
||
168 | return $this->setProperty('discount', $discount); |
||
169 | } |
||
170 | |||
171 | /** |
||
172 | * Code used to redeem a discount. |
||
173 | * |
||
174 | * @param string|string[] $discountCode |
||
175 | * |
||
176 | * @return static |
||
177 | * |
||
178 | * @see http://schema.org/discountCode |
||
179 | */ |
||
180 | public function discountCode($discountCode) |
||
181 | { |
||
182 | return $this->setProperty('discountCode', $discountCode); |
||
183 | } |
||
184 | |||
185 | /** |
||
186 | * The currency of the discount. |
||
187 | * |
||
188 | * Use standard formats: [ISO 4217 currency |
||
189 | * format](http://en.wikipedia.org/wiki/ISO_4217) e.g. "USD"; [Ticker |
||
190 | * symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for |
||
191 | * cryptocurrencies e.g. "BTC"; well known names for [Local Exchange |
||
192 | * Tradings |
||
193 | * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system) |
||
194 | * (LETS) and other currency types e.g. "Ithaca HOUR". |
||
195 | * |
||
196 | * @param string|string[] $discountCurrency |
||
197 | * |
||
198 | * @return static |
||
199 | * |
||
200 | * @see http://schema.org/discountCurrency |
||
201 | */ |
||
202 | public function discountCurrency($discountCurrency) |
||
203 | { |
||
204 | return $this->setProperty('discountCurrency', $discountCurrency); |
||
205 | } |
||
206 | |||
207 | /** |
||
208 | * The identifier property represents any kind of identifier for any kind of |
||
209 | * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides |
||
210 | * dedicated properties for representing many of these, either as textual |
||
211 | * strings or as URL (URI) links. See [background |
||
212 | * notes](/docs/datamodel.html#identifierBg) for more details. |
||
213 | * |
||
214 | * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier |
||
215 | * |
||
216 | * @return static |
||
217 | * |
||
218 | * @see http://schema.org/identifier |
||
219 | */ |
||
220 | public function identifier($identifier) |
||
221 | { |
||
222 | return $this->setProperty('identifier', $identifier); |
||
223 | } |
||
224 | |||
225 | /** |
||
226 | * An image of the item. This can be a [[URL]] or a fully described |
||
227 | * [[ImageObject]]. |
||
228 | * |
||
229 | * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image |
||
230 | * |
||
231 | * @return static |
||
232 | * |
||
233 | * @see http://schema.org/image |
||
234 | */ |
||
235 | public function image($image) |
||
236 | { |
||
237 | return $this->setProperty('image', $image); |
||
238 | } |
||
239 | |||
240 | /** |
||
241 | * Was the offer accepted as a gift for someone other than the buyer. |
||
242 | * |
||
243 | * @param bool|bool[] $isGift |
||
244 | * |
||
245 | * @return static |
||
246 | * |
||
247 | * @see http://schema.org/isGift |
||
248 | */ |
||
249 | public function isGift($isGift) |
||
250 | { |
||
251 | return $this->setProperty('isGift', $isGift); |
||
252 | } |
||
253 | |||
254 | /** |
||
255 | * Indicates a page (or other CreativeWork) for which this thing is the main |
||
256 | * entity being described. See [background |
||
257 | * notes](/docs/datamodel.html#mainEntityBackground) for details. |
||
258 | * |
||
259 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage |
||
260 | * |
||
261 | * @return static |
||
262 | * |
||
263 | * @see http://schema.org/mainEntityOfPage |
||
264 | */ |
||
265 | public function mainEntityOfPage($mainEntityOfPage) |
||
266 | { |
||
267 | return $this->setProperty('mainEntityOfPage', $mainEntityOfPage); |
||
268 | } |
||
269 | |||
270 | /** |
||
271 | * 'merchant' is an out-dated term for 'seller'. |
||
272 | * |
||
273 | * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $merchant |
||
274 | * |
||
275 | * @return static |
||
276 | * |
||
277 | * @see http://schema.org/merchant |
||
278 | */ |
||
279 | public function merchant($merchant) |
||
280 | { |
||
281 | return $this->setProperty('merchant', $merchant); |
||
282 | } |
||
283 | |||
284 | /** |
||
285 | * The name of the item. |
||
286 | * |
||
287 | * @param string|string[] $name |
||
288 | * |
||
289 | * @return static |
||
290 | * |
||
291 | * @see http://schema.org/name |
||
292 | */ |
||
293 | public function name($name) |
||
294 | { |
||
295 | return $this->setProperty('name', $name); |
||
296 | } |
||
297 | |||
298 | /** |
||
299 | * Date order was placed. |
||
300 | * |
||
301 | * @param \DateTimeInterface|\DateTimeInterface[] $orderDate |
||
302 | * |
||
303 | * @return static |
||
304 | * |
||
305 | * @see http://schema.org/orderDate |
||
306 | */ |
||
307 | public function orderDate($orderDate) |
||
308 | { |
||
309 | return $this->setProperty('orderDate', $orderDate); |
||
310 | } |
||
311 | |||
312 | /** |
||
313 | * The delivery of the parcel related to this order or order item. |
||
314 | * |
||
315 | * @param \Spatie\SchemaOrg\Contracts\ParcelDeliveryContract|\Spatie\SchemaOrg\Contracts\ParcelDeliveryContract[] $orderDelivery |
||
316 | * |
||
317 | * @return static |
||
318 | * |
||
319 | * @see http://schema.org/orderDelivery |
||
320 | */ |
||
321 | public function orderDelivery($orderDelivery) |
||
322 | { |
||
323 | return $this->setProperty('orderDelivery', $orderDelivery); |
||
324 | } |
||
325 | |||
326 | /** |
||
327 | * The identifier of the transaction. |
||
328 | * |
||
329 | * @param string|string[] $orderNumber |
||
330 | * |
||
331 | * @return static |
||
332 | * |
||
333 | * @see http://schema.org/orderNumber |
||
334 | */ |
||
335 | public function orderNumber($orderNumber) |
||
336 | { |
||
337 | return $this->setProperty('orderNumber', $orderNumber); |
||
338 | } |
||
339 | |||
340 | /** |
||
341 | * The current status of the order. |
||
342 | * |
||
343 | * @param \Spatie\SchemaOrg\Contracts\OrderStatusContract|\Spatie\SchemaOrg\Contracts\OrderStatusContract[] $orderStatus |
||
344 | * |
||
345 | * @return static |
||
346 | * |
||
347 | * @see http://schema.org/orderStatus |
||
348 | */ |
||
349 | public function orderStatus($orderStatus) |
||
350 | { |
||
351 | return $this->setProperty('orderStatus', $orderStatus); |
||
352 | } |
||
353 | |||
354 | /** |
||
355 | * The item ordered. |
||
356 | * |
||
357 | * @param \Spatie\SchemaOrg\Contracts\OrderItemContract|\Spatie\SchemaOrg\Contracts\OrderItemContract[]|\Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|\Spatie\SchemaOrg\Contracts\ServiceContract|\Spatie\SchemaOrg\Contracts\ServiceContract[] $orderedItem |
||
358 | * |
||
359 | * @return static |
||
360 | * |
||
361 | * @see http://schema.org/orderedItem |
||
362 | */ |
||
363 | public function orderedItem($orderedItem) |
||
364 | { |
||
365 | return $this->setProperty('orderedItem', $orderedItem); |
||
366 | } |
||
367 | |||
368 | /** |
||
369 | * The order is being paid as part of the referenced Invoice. |
||
370 | * |
||
371 | * @param \Spatie\SchemaOrg\Contracts\InvoiceContract|\Spatie\SchemaOrg\Contracts\InvoiceContract[] $partOfInvoice |
||
372 | * |
||
373 | * @return static |
||
374 | * |
||
375 | * @see http://schema.org/partOfInvoice |
||
376 | */ |
||
377 | public function partOfInvoice($partOfInvoice) |
||
378 | { |
||
379 | return $this->setProperty('partOfInvoice', $partOfInvoice); |
||
380 | } |
||
381 | |||
382 | /** |
||
383 | * The date that payment is due. |
||
384 | * |
||
385 | * @param \DateTimeInterface|\DateTimeInterface[] $paymentDue |
||
386 | * |
||
387 | * @return static |
||
388 | * |
||
389 | * @see http://schema.org/paymentDue |
||
390 | */ |
||
391 | public function paymentDue($paymentDue) |
||
392 | { |
||
393 | return $this->setProperty('paymentDue', $paymentDue); |
||
394 | } |
||
395 | |||
396 | /** |
||
397 | * The date that payment is due. |
||
398 | * |
||
399 | * @param \DateTimeInterface|\DateTimeInterface[] $paymentDueDate |
||
400 | * |
||
401 | * @return static |
||
402 | * |
||
403 | * @see http://schema.org/paymentDueDate |
||
404 | */ |
||
405 | public function paymentDueDate($paymentDueDate) |
||
406 | { |
||
407 | return $this->setProperty('paymentDueDate', $paymentDueDate); |
||
408 | } |
||
409 | |||
410 | /** |
||
411 | * The name of the credit card or other method of payment for the order. |
||
412 | * |
||
413 | * @param \Spatie\SchemaOrg\Contracts\PaymentMethodContract|\Spatie\SchemaOrg\Contracts\PaymentMethodContract[] $paymentMethod |
||
414 | * |
||
415 | * @return static |
||
416 | * |
||
417 | * @see http://schema.org/paymentMethod |
||
418 | */ |
||
419 | public function paymentMethod($paymentMethod) |
||
420 | { |
||
421 | return $this->setProperty('paymentMethod', $paymentMethod); |
||
422 | } |
||
423 | |||
424 | /** |
||
425 | * An identifier for the method of payment used (e.g. the last 4 digits of |
||
426 | * the credit card). |
||
427 | * |
||
428 | * @param string|string[] $paymentMethodId |
||
429 | * |
||
430 | * @return static |
||
431 | * |
||
432 | * @see http://schema.org/paymentMethodId |
||
433 | */ |
||
434 | public function paymentMethodId($paymentMethodId) |
||
435 | { |
||
436 | return $this->setProperty('paymentMethodId', $paymentMethodId); |
||
437 | } |
||
438 | |||
439 | /** |
||
440 | * The URL for sending a payment. |
||
441 | * |
||
442 | * @param string|string[] $paymentUrl |
||
443 | * |
||
444 | * @return static |
||
445 | * |
||
446 | * @see http://schema.org/paymentUrl |
||
447 | */ |
||
448 | public function paymentUrl($paymentUrl) |
||
449 | { |
||
450 | return $this->setProperty('paymentUrl', $paymentUrl); |
||
451 | } |
||
452 | |||
453 | /** |
||
454 | * Indicates a potential Action, which describes an idealized action in |
||
455 | * which this thing would play an 'object' role. |
||
456 | * |
||
457 | * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction |
||
458 | * |
||
459 | * @return static |
||
460 | * |
||
461 | * @see http://schema.org/potentialAction |
||
462 | */ |
||
463 | public function potentialAction($potentialAction) |
||
464 | { |
||
465 | return $this->setProperty('potentialAction', $potentialAction); |
||
466 | } |
||
467 | |||
468 | /** |
||
469 | * URL of a reference Web page that unambiguously indicates the item's |
||
470 | * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or |
||
471 | * official website. |
||
472 | * |
||
473 | * @param string|string[] $sameAs |
||
474 | * |
||
475 | * @return static |
||
476 | * |
||
477 | * @see http://schema.org/sameAs |
||
478 | */ |
||
479 | public function sameAs($sameAs) |
||
480 | { |
||
481 | return $this->setProperty('sameAs', $sameAs); |
||
482 | } |
||
483 | |||
484 | /** |
||
485 | * An entity which offers (sells / leases / lends / loans) the services / |
||
486 | * goods. A seller may also be a provider. |
||
487 | * |
||
488 | * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $seller |
||
489 | * |
||
490 | * @return static |
||
491 | * |
||
492 | * @see http://schema.org/seller |
||
493 | */ |
||
494 | public function seller($seller) |
||
495 | { |
||
496 | return $this->setProperty('seller', $seller); |
||
497 | } |
||
498 | |||
499 | /** |
||
500 | * A CreativeWork or Event about this Thing. |
||
501 | * |
||
502 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf |
||
503 | * |
||
504 | * @return static |
||
505 | * |
||
506 | * @see http://schema.org/subjectOf |
||
507 | */ |
||
508 | public function subjectOf($subjectOf) |
||
509 | { |
||
510 | return $this->setProperty('subjectOf', $subjectOf); |
||
511 | } |
||
512 | |||
513 | /** |
||
514 | * URL of the item. |
||
515 | * |
||
516 | * @param string|string[] $url |
||
517 | * |
||
518 | * @return static |
||
519 | * |
||
520 | * @see http://schema.org/url |
||
521 | */ |
||
522 | public function url($url) |
||
523 | { |
||
524 | return $this->setProperty('url', $url); |
||
525 | } |
||
526 | |||
527 | } |
||
528 |
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.