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/Reservation.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\ReservationContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
9
/**
10
 * Describes a reservation for travel, dining or an event. Some reservations
11
 * require tickets. 
12
 * 
13
 * Note: This type is for information about actual reservations, e.g. in
14
 * confirmation emails or HTML pages with individual confirmations of
15
 * reservations. For offers of tickets, restaurant reservations, flights, or
16
 * rental cars, use [[Offer]].
17
 *
18
 * @see http://schema.org/Reservation
19
 *
20
 */
21 View Code Duplication
class Reservation extends BaseType implements ReservationContract, IntangibleContract, 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...
22
{
23
    /**
24
     * An additional type for the item, typically used for adding more specific
25
     * types from external vocabularies in microdata syntax. This is a
26
     * relationship between something and a class that the thing is in. In RDFa
27
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
28
     * attribute - for multiple types. Schema.org tools may have only weaker
29
     * understanding of extra types, in particular those defined externally.
30
     *
31
     * @param string|string[] $additionalType
32
     *
33
     * @return static
34
     *
35
     * @see http://schema.org/additionalType
36
     */
37
    public function additionalType($additionalType)
38
    {
39
        return $this->setProperty('additionalType', $additionalType);
40
    }
41
42
    /**
43
     * An alias for the item.
44
     *
45
     * @param string|string[] $alternateName
46
     *
47
     * @return static
48
     *
49
     * @see http://schema.org/alternateName
50
     */
51
    public function alternateName($alternateName)
52
    {
53
        return $this->setProperty('alternateName', $alternateName);
54
    }
55
56
    /**
57
     * 'bookingAgent' is an out-dated term indicating a 'broker' that serves as
58
     * a booking agent.
59
     *
60
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $bookingAgent
61
     *
62
     * @return static
63
     *
64
     * @see http://schema.org/bookingAgent
65
     */
66
    public function bookingAgent($bookingAgent)
67
    {
68
        return $this->setProperty('bookingAgent', $bookingAgent);
69
    }
70
71
    /**
72
     * The date and time the reservation was booked.
73
     *
74
     * @param \DateTimeInterface|\DateTimeInterface[] $bookingTime
75
     *
76
     * @return static
77
     *
78
     * @see http://schema.org/bookingTime
79
     */
80
    public function bookingTime($bookingTime)
81
    {
82
        return $this->setProperty('bookingTime', $bookingTime);
83
    }
84
85
    /**
86
     * An entity that arranges for an exchange between a buyer and a seller.  In
87
     * most cases a broker never acquires or releases ownership of a product or
88
     * service involved in an exchange.  If it is not clear whether an entity is
89
     * a broker, seller, or buyer, the latter two terms are preferred.
90
     *
91
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $broker
92
     *
93
     * @return static
94
     *
95
     * @see http://schema.org/broker
96
     */
97
    public function broker($broker)
98
    {
99
        return $this->setProperty('broker', $broker);
100
    }
101
102
    /**
103
     * A description of the item.
104
     *
105
     * @param string|string[] $description
106
     *
107
     * @return static
108
     *
109
     * @see http://schema.org/description
110
     */
111
    public function description($description)
112
    {
113
        return $this->setProperty('description', $description);
114
    }
115
116
    /**
117
     * A sub property of description. A short description of the item used to
118
     * disambiguate from other, similar items. Information from other properties
119
     * (in particular, name) may be necessary for the description to be useful
120
     * for disambiguation.
121
     *
122
     * @param string|string[] $disambiguatingDescription
123
     *
124
     * @return static
125
     *
126
     * @see http://schema.org/disambiguatingDescription
127
     */
128
    public function disambiguatingDescription($disambiguatingDescription)
129
    {
130
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
131
    }
132
133
    /**
134
     * The identifier property represents any kind of identifier for any kind of
135
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
136
     * dedicated properties for representing many of these, either as textual
137
     * strings or as URL (URI) links. See [background
138
     * notes](/docs/datamodel.html#identifierBg) for more details.
139
     *
140
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
141
     *
142
     * @return static
143
     *
144
     * @see http://schema.org/identifier
145
     */
146
    public function identifier($identifier)
147
    {
148
        return $this->setProperty('identifier', $identifier);
149
    }
150
151
    /**
152
     * An image of the item. This can be a [[URL]] or a fully described
153
     * [[ImageObject]].
154
     *
155
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
156
     *
157
     * @return static
158
     *
159
     * @see http://schema.org/image
160
     */
161
    public function image($image)
162
    {
163
        return $this->setProperty('image', $image);
164
    }
165
166
    /**
167
     * Indicates a page (or other CreativeWork) for which this thing is the main
168
     * entity being described. See [background
169
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
170
     *
171
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
172
     *
173
     * @return static
174
     *
175
     * @see http://schema.org/mainEntityOfPage
176
     */
177
    public function mainEntityOfPage($mainEntityOfPage)
178
    {
179
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
180
    }
181
182
    /**
183
     * The date and time the reservation was modified.
184
     *
185
     * @param \DateTimeInterface|\DateTimeInterface[] $modifiedTime
186
     *
187
     * @return static
188
     *
189
     * @see http://schema.org/modifiedTime
190
     */
191
    public function modifiedTime($modifiedTime)
192
    {
193
        return $this->setProperty('modifiedTime', $modifiedTime);
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 currency of the price, or a price component when attached to
227
     * [[PriceSpecification]] and its subtypes.
228
     * 
229
     * Use standard formats: [ISO 4217 currency
230
     * format](http://en.wikipedia.org/wiki/ISO_4217) e.g. "USD"; [Ticker
231
     * symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for
232
     * cryptocurrencies e.g. "BTC"; well known names for [Local Exchange
233
     * Tradings
234
     * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
235
     * (LETS) and other currency types e.g. "Ithaca HOUR".
236
     *
237
     * @param string|string[] $priceCurrency
238
     *
239
     * @return static
240
     *
241
     * @see http://schema.org/priceCurrency
242
     */
243
    public function priceCurrency($priceCurrency)
244
    {
245
        return $this->setProperty('priceCurrency', $priceCurrency);
246
    }
247
248
    /**
249
     * Any membership in a frequent flyer, hotel loyalty program, etc. being
250
     * applied to the reservation.
251
     *
252
     * @param \Spatie\SchemaOrg\Contracts\ProgramMembershipContract|\Spatie\SchemaOrg\Contracts\ProgramMembershipContract[] $programMembershipUsed
253
     *
254
     * @return static
255
     *
256
     * @see http://schema.org/programMembershipUsed
257
     */
258
    public function programMembershipUsed($programMembershipUsed)
259
    {
260
        return $this->setProperty('programMembershipUsed', $programMembershipUsed);
261
    }
262
263
    /**
264
     * The service provider, service operator, or service performer; the goods
265
     * producer. Another party (a seller) may offer those services or goods on
266
     * behalf of the provider. A provider may also serve as the seller.
267
     *
268
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $provider
269
     *
270
     * @return static
271
     *
272
     * @see http://schema.org/provider
273
     */
274
    public function provider($provider)
275
    {
276
        return $this->setProperty('provider', $provider);
277
    }
278
279
    /**
280
     * The thing -- flight, event, restaurant,etc. being reserved.
281
     *
282
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $reservationFor
283
     *
284
     * @return static
285
     *
286
     * @see http://schema.org/reservationFor
287
     */
288
    public function reservationFor($reservationFor)
289
    {
290
        return $this->setProperty('reservationFor', $reservationFor);
291
    }
292
293
    /**
294
     * A unique identifier for the reservation.
295
     *
296
     * @param string|string[] $reservationId
297
     *
298
     * @return static
299
     *
300
     * @see http://schema.org/reservationId
301
     */
302
    public function reservationId($reservationId)
303
    {
304
        return $this->setProperty('reservationId', $reservationId);
305
    }
306
307
    /**
308
     * The current status of the reservation.
309
     *
310
     * @param \Spatie\SchemaOrg\Contracts\ReservationStatusTypeContract|\Spatie\SchemaOrg\Contracts\ReservationStatusTypeContract[] $reservationStatus
311
     *
312
     * @return static
313
     *
314
     * @see http://schema.org/reservationStatus
315
     */
316
    public function reservationStatus($reservationStatus)
317
    {
318
        return $this->setProperty('reservationStatus', $reservationStatus);
319
    }
320
321
    /**
322
     * A ticket associated with the reservation.
323
     *
324
     * @param \Spatie\SchemaOrg\Contracts\TicketContract|\Spatie\SchemaOrg\Contracts\TicketContract[] $reservedTicket
325
     *
326
     * @return static
327
     *
328
     * @see http://schema.org/reservedTicket
329
     */
330
    public function reservedTicket($reservedTicket)
331
    {
332
        return $this->setProperty('reservedTicket', $reservedTicket);
333
    }
334
335
    /**
336
     * URL of a reference Web page that unambiguously indicates the item's
337
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
338
     * official website.
339
     *
340
     * @param string|string[] $sameAs
341
     *
342
     * @return static
343
     *
344
     * @see http://schema.org/sameAs
345
     */
346
    public function sameAs($sameAs)
347
    {
348
        return $this->setProperty('sameAs', $sameAs);
349
    }
350
351
    /**
352
     * A CreativeWork or Event about this Thing.
353
     *
354
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
355
     *
356
     * @return static
357
     *
358
     * @see http://schema.org/subjectOf
359
     */
360
    public function subjectOf($subjectOf)
361
    {
362
        return $this->setProperty('subjectOf', $subjectOf);
363
    }
364
365
    /**
366
     * The total price for the reservation or ticket, including applicable
367
     * taxes, shipping, etc.
368
     * 
369
     * Usage guidelines:
370
     * 
371
     * * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT
372
     * NINE' (U+0039)) rather than superficially similiar Unicode symbols.
373
     * * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a
374
     * decimal point. Avoid using these symbols as a readability separator.
375
     *
376
     * @param \Spatie\SchemaOrg\Contracts\PriceSpecificationContract|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract[]|float|float[]|int|int[]|string|string[] $totalPrice
377
     *
378
     * @return static
379
     *
380
     * @see http://schema.org/totalPrice
381
     */
382
    public function totalPrice($totalPrice)
383
    {
384
        return $this->setProperty('totalPrice', $totalPrice);
385
    }
386
387
    /**
388
     * The person or organization the reservation or ticket is for.
389
     *
390
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $underName
391
     *
392
     * @return static
393
     *
394
     * @see http://schema.org/underName
395
     */
396
    public function underName($underName)
397
    {
398
        return $this->setProperty('underName', $underName);
399
    }
400
401
    /**
402
     * URL of the item.
403
     *
404
     * @param string|string[] $url
405
     *
406
     * @return static
407
     *
408
     * @see http://schema.org/url
409
     */
410
    public function url($url)
411
    {
412
        return $this->setProperty('url', $url);
413
    }
414
415
}
416