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/Flight.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\FlightContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
use \Spatie\SchemaOrg\Contracts\TripContract;
9
10
/**
11
 * An airline flight.
12
 *
13
 * @see http://schema.org/Flight
14
 *
15
 */
16 View Code Duplication
class Flight extends BaseType implements FlightContract, IntangibleContract, ThingContract, TripContract
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...
17
{
18
    /**
19
     * An additional type for the item, typically used for adding more specific
20
     * types from external vocabularies in microdata syntax. This is a
21
     * relationship between something and a class that the thing is in. In RDFa
22
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
23
     * attribute - for multiple types. Schema.org tools may have only weaker
24
     * understanding of extra types, in particular those defined externally.
25
     *
26
     * @param string|string[] $additionalType
27
     *
28
     * @return static
29
     *
30
     * @see http://schema.org/additionalType
31
     */
32
    public function additionalType($additionalType)
33
    {
34
        return $this->setProperty('additionalType', $additionalType);
35
    }
36
37
    /**
38
     * The kind of aircraft (e.g., "Boeing 747").
39
     *
40
     * @param \Spatie\SchemaOrg\Contracts\VehicleContract|\Spatie\SchemaOrg\Contracts\VehicleContract[]|string|string[] $aircraft
41
     *
42
     * @return static
43
     *
44
     * @see http://schema.org/aircraft
45
     */
46
    public function aircraft($aircraft)
47
    {
48
        return $this->setProperty('aircraft', $aircraft);
49
    }
50
51
    /**
52
     * An alias for the item.
53
     *
54
     * @param string|string[] $alternateName
55
     *
56
     * @return static
57
     *
58
     * @see http://schema.org/alternateName
59
     */
60
    public function alternateName($alternateName)
61
    {
62
        return $this->setProperty('alternateName', $alternateName);
63
    }
64
65
    /**
66
     * The airport where the flight terminates.
67
     *
68
     * @param \Spatie\SchemaOrg\Contracts\AirportContract|\Spatie\SchemaOrg\Contracts\AirportContract[] $arrivalAirport
69
     *
70
     * @return static
71
     *
72
     * @see http://schema.org/arrivalAirport
73
     */
74
    public function arrivalAirport($arrivalAirport)
75
    {
76
        return $this->setProperty('arrivalAirport', $arrivalAirport);
77
    }
78
79
    /**
80
     * Identifier of the flight's arrival gate.
81
     *
82
     * @param string|string[] $arrivalGate
83
     *
84
     * @return static
85
     *
86
     * @see http://schema.org/arrivalGate
87
     */
88
    public function arrivalGate($arrivalGate)
89
    {
90
        return $this->setProperty('arrivalGate', $arrivalGate);
91
    }
92
93
    /**
94
     * Identifier of the flight's arrival terminal.
95
     *
96
     * @param string|string[] $arrivalTerminal
97
     *
98
     * @return static
99
     *
100
     * @see http://schema.org/arrivalTerminal
101
     */
102
    public function arrivalTerminal($arrivalTerminal)
103
    {
104
        return $this->setProperty('arrivalTerminal', $arrivalTerminal);
105
    }
106
107
    /**
108
     * The expected arrival time.
109
     *
110
     * @param \DateTimeInterface|\DateTimeInterface[] $arrivalTime
111
     *
112
     * @return static
113
     *
114
     * @see http://schema.org/arrivalTime
115
     */
116
    public function arrivalTime($arrivalTime)
117
    {
118
        return $this->setProperty('arrivalTime', $arrivalTime);
119
    }
120
121
    /**
122
     * The type of boarding policy used by the airline (e.g. zone-based or
123
     * group-based).
124
     *
125
     * @param \Spatie\SchemaOrg\Contracts\BoardingPolicyTypeContract|\Spatie\SchemaOrg\Contracts\BoardingPolicyTypeContract[] $boardingPolicy
126
     *
127
     * @return static
128
     *
129
     * @see http://schema.org/boardingPolicy
130
     */
131
    public function boardingPolicy($boardingPolicy)
132
    {
133
        return $this->setProperty('boardingPolicy', $boardingPolicy);
134
    }
135
136
    /**
137
     * 'carrier' is an out-dated term indicating the 'provider' for parcel
138
     * delivery and flights.
139
     *
140
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[] $carrier
141
     *
142
     * @return static
143
     *
144
     * @see http://schema.org/carrier
145
     */
146
    public function carrier($carrier)
147
    {
148
        return $this->setProperty('carrier', $carrier);
149
    }
150
151
    /**
152
     * The airport where the flight originates.
153
     *
154
     * @param \Spatie\SchemaOrg\Contracts\AirportContract|\Spatie\SchemaOrg\Contracts\AirportContract[] $departureAirport
155
     *
156
     * @return static
157
     *
158
     * @see http://schema.org/departureAirport
159
     */
160
    public function departureAirport($departureAirport)
161
    {
162
        return $this->setProperty('departureAirport', $departureAirport);
163
    }
164
165
    /**
166
     * Identifier of the flight's departure gate.
167
     *
168
     * @param string|string[] $departureGate
169
     *
170
     * @return static
171
     *
172
     * @see http://schema.org/departureGate
173
     */
174
    public function departureGate($departureGate)
175
    {
176
        return $this->setProperty('departureGate', $departureGate);
177
    }
178
179
    /**
180
     * Identifier of the flight's departure terminal.
181
     *
182
     * @param string|string[] $departureTerminal
183
     *
184
     * @return static
185
     *
186
     * @see http://schema.org/departureTerminal
187
     */
188
    public function departureTerminal($departureTerminal)
189
    {
190
        return $this->setProperty('departureTerminal', $departureTerminal);
191
    }
192
193
    /**
194
     * The expected departure time.
195
     *
196
     * @param \DateTimeInterface|\DateTimeInterface[] $departureTime
197
     *
198
     * @return static
199
     *
200
     * @see http://schema.org/departureTime
201
     */
202
    public function departureTime($departureTime)
203
    {
204
        return $this->setProperty('departureTime', $departureTime);
205
    }
206
207
    /**
208
     * A description of the item.
209
     *
210
     * @param string|string[] $description
211
     *
212
     * @return static
213
     *
214
     * @see http://schema.org/description
215
     */
216
    public function description($description)
217
    {
218
        return $this->setProperty('description', $description);
219
    }
220
221
    /**
222
     * A sub property of description. A short description of the item used to
223
     * disambiguate from other, similar items. Information from other properties
224
     * (in particular, name) may be necessary for the description to be useful
225
     * for disambiguation.
226
     *
227
     * @param string|string[] $disambiguatingDescription
228
     *
229
     * @return static
230
     *
231
     * @see http://schema.org/disambiguatingDescription
232
     */
233
    public function disambiguatingDescription($disambiguatingDescription)
234
    {
235
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
236
    }
237
238
    /**
239
     * The estimated time the flight will take.
240
     *
241
     * @param \Spatie\SchemaOrg\Contracts\DurationContract|\Spatie\SchemaOrg\Contracts\DurationContract[]|string|string[] $estimatedFlightDuration
242
     *
243
     * @return static
244
     *
245
     * @see http://schema.org/estimatedFlightDuration
246
     */
247
    public function estimatedFlightDuration($estimatedFlightDuration)
248
    {
249
        return $this->setProperty('estimatedFlightDuration', $estimatedFlightDuration);
250
    }
251
252
    /**
253
     * The distance of the flight.
254
     *
255
     * @param \Spatie\SchemaOrg\Contracts\DistanceContract|\Spatie\SchemaOrg\Contracts\DistanceContract[]|string|string[] $flightDistance
256
     *
257
     * @return static
258
     *
259
     * @see http://schema.org/flightDistance
260
     */
261
    public function flightDistance($flightDistance)
262
    {
263
        return $this->setProperty('flightDistance', $flightDistance);
264
    }
265
266
    /**
267
     * The unique identifier for a flight including the airline IATA code. For
268
     * example, if describing United flight 110, where the IATA code for United
269
     * is 'UA', the flightNumber is 'UA110'.
270
     *
271
     * @param string|string[] $flightNumber
272
     *
273
     * @return static
274
     *
275
     * @see http://schema.org/flightNumber
276
     */
277
    public function flightNumber($flightNumber)
278
    {
279
        return $this->setProperty('flightNumber', $flightNumber);
280
    }
281
282
    /**
283
     * The identifier property represents any kind of identifier for any kind of
284
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
285
     * dedicated properties for representing many of these, either as textual
286
     * strings or as URL (URI) links. See [background
287
     * notes](/docs/datamodel.html#identifierBg) for more details.
288
     *
289
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
290
     *
291
     * @return static
292
     *
293
     * @see http://schema.org/identifier
294
     */
295
    public function identifier($identifier)
296
    {
297
        return $this->setProperty('identifier', $identifier);
298
    }
299
300
    /**
301
     * An image of the item. This can be a [[URL]] or a fully described
302
     * [[ImageObject]].
303
     *
304
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
305
     *
306
     * @return static
307
     *
308
     * @see http://schema.org/image
309
     */
310
    public function image($image)
311
    {
312
        return $this->setProperty('image', $image);
313
    }
314
315
    /**
316
     * Indicates a page (or other CreativeWork) for which this thing is the main
317
     * entity being described. See [background
318
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
319
     *
320
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
321
     *
322
     * @return static
323
     *
324
     * @see http://schema.org/mainEntityOfPage
325
     */
326
    public function mainEntityOfPage($mainEntityOfPage)
327
    {
328
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
329
    }
330
331
    /**
332
     * Description of the meals that will be provided or available for purchase.
333
     *
334
     * @param string|string[] $mealService
335
     *
336
     * @return static
337
     *
338
     * @see http://schema.org/mealService
339
     */
340
    public function mealService($mealService)
341
    {
342
        return $this->setProperty('mealService', $mealService);
343
    }
344
345
    /**
346
     * The name of the item.
347
     *
348
     * @param string|string[] $name
349
     *
350
     * @return static
351
     *
352
     * @see http://schema.org/name
353
     */
354
    public function name($name)
355
    {
356
        return $this->setProperty('name', $name);
357
    }
358
359
    /**
360
     * An offer to provide this item&#x2014;for example, an offer to sell a
361
     * product, rent the DVD of a movie, perform a service, or give away tickets
362
     * to an event. Use [[businessFunction]] to indicate the kind of transaction
363
     * offered, i.e. sell, lease, etc. This property can also be used to
364
     * describe a [[Demand]]. While this property is listed as expected on a
365
     * number of common types, it can be used in others. In that case, using a
366
     * second type, such as Product or a subtype of Product, can clarify the
367
     * nature of the offer.
368
     *
369
     * @param \Spatie\SchemaOrg\Contracts\DemandContract|\Spatie\SchemaOrg\Contracts\DemandContract[]|\Spatie\SchemaOrg\Contracts\OfferContract|\Spatie\SchemaOrg\Contracts\OfferContract[] $offers
370
     *
371
     * @return static
372
     *
373
     * @see http://schema.org/offers
374
     */
375
    public function offers($offers)
376
    {
377
        return $this->setProperty('offers', $offers);
378
    }
379
380
    /**
381
     * Indicates a potential Action, which describes an idealized action in
382
     * which this thing would play an 'object' role.
383
     *
384
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
385
     *
386
     * @return static
387
     *
388
     * @see http://schema.org/potentialAction
389
     */
390
    public function potentialAction($potentialAction)
391
    {
392
        return $this->setProperty('potentialAction', $potentialAction);
393
    }
394
395
    /**
396
     * The service provider, service operator, or service performer; the goods
397
     * producer. Another party (a seller) may offer those services or goods on
398
     * behalf of the provider. A provider may also serve as the seller.
399
     *
400
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $provider
401
     *
402
     * @return static
403
     *
404
     * @see http://schema.org/provider
405
     */
406
    public function provider($provider)
407
    {
408
        return $this->setProperty('provider', $provider);
409
    }
410
411
    /**
412
     * URL of a reference Web page that unambiguously indicates the item's
413
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
414
     * official website.
415
     *
416
     * @param string|string[] $sameAs
417
     *
418
     * @return static
419
     *
420
     * @see http://schema.org/sameAs
421
     */
422
    public function sameAs($sameAs)
423
    {
424
        return $this->setProperty('sameAs', $sameAs);
425
    }
426
427
    /**
428
     * An entity which offers (sells / leases / lends / loans) the services /
429
     * goods.  A seller may also be a provider.
430
     *
431
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $seller
432
     *
433
     * @return static
434
     *
435
     * @see http://schema.org/seller
436
     */
437
    public function seller($seller)
438
    {
439
        return $this->setProperty('seller', $seller);
440
    }
441
442
    /**
443
     * A CreativeWork or Event about this Thing.
444
     *
445
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
446
     *
447
     * @return static
448
     *
449
     * @see http://schema.org/subjectOf
450
     */
451
    public function subjectOf($subjectOf)
452
    {
453
        return $this->setProperty('subjectOf', $subjectOf);
454
    }
455
456
    /**
457
     * URL of the item.
458
     *
459
     * @param string|string[] $url
460
     *
461
     * @return static
462
     *
463
     * @see http://schema.org/url
464
     */
465
    public function url($url)
466
    {
467
        return $this->setProperty('url', $url);
468
    }
469
470
    /**
471
     * The time when a passenger can check into the flight online.
472
     *
473
     * @param \DateTimeInterface|\DateTimeInterface[] $webCheckinTime
474
     *
475
     * @return static
476
     *
477
     * @see http://schema.org/webCheckinTime
478
     */
479
    public function webCheckinTime($webCheckinTime)
480
    {
481
        return $this->setProperty('webCheckinTime', $webCheckinTime);
482
    }
483
484
}
485