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/TrainTrip.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\TrainTripContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
use \Spatie\SchemaOrg\Contracts\TripContract;
9
10
/**
11
 * A trip on a commercial train line.
12
 *
13
 * @see http://schema.org/TrainTrip
14
 *
15
 */
16 View Code Duplication
class TrainTrip extends BaseType implements TrainTripContract, 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
     * An alias for the item.
39
     *
40
     * @param string|string[] $alternateName
41
     *
42
     * @return static
43
     *
44
     * @see http://schema.org/alternateName
45
     */
46
    public function alternateName($alternateName)
47
    {
48
        return $this->setProperty('alternateName', $alternateName);
49
    }
50
51
    /**
52
     * The platform where the train arrives.
53
     *
54
     * @param string|string[] $arrivalPlatform
55
     *
56
     * @return static
57
     *
58
     * @see http://schema.org/arrivalPlatform
59
     */
60
    public function arrivalPlatform($arrivalPlatform)
61
    {
62
        return $this->setProperty('arrivalPlatform', $arrivalPlatform);
63
    }
64
65
    /**
66
     * The station where the train trip ends.
67
     *
68
     * @param \Spatie\SchemaOrg\Contracts\TrainStationContract|\Spatie\SchemaOrg\Contracts\TrainStationContract[] $arrivalStation
69
     *
70
     * @return static
71
     *
72
     * @see http://schema.org/arrivalStation
73
     */
74
    public function arrivalStation($arrivalStation)
75
    {
76
        return $this->setProperty('arrivalStation', $arrivalStation);
77
    }
78
79
    /**
80
     * The expected arrival time.
81
     *
82
     * @param \DateTimeInterface|\DateTimeInterface[] $arrivalTime
83
     *
84
     * @return static
85
     *
86
     * @see http://schema.org/arrivalTime
87
     */
88
    public function arrivalTime($arrivalTime)
89
    {
90
        return $this->setProperty('arrivalTime', $arrivalTime);
91
    }
92
93
    /**
94
     * The platform from which the train departs.
95
     *
96
     * @param string|string[] $departurePlatform
97
     *
98
     * @return static
99
     *
100
     * @see http://schema.org/departurePlatform
101
     */
102
    public function departurePlatform($departurePlatform)
103
    {
104
        return $this->setProperty('departurePlatform', $departurePlatform);
105
    }
106
107
    /**
108
     * The station from which the train departs.
109
     *
110
     * @param \Spatie\SchemaOrg\Contracts\TrainStationContract|\Spatie\SchemaOrg\Contracts\TrainStationContract[] $departureStation
111
     *
112
     * @return static
113
     *
114
     * @see http://schema.org/departureStation
115
     */
116
    public function departureStation($departureStation)
117
    {
118
        return $this->setProperty('departureStation', $departureStation);
119
    }
120
121
    /**
122
     * The expected departure time.
123
     *
124
     * @param \DateTimeInterface|\DateTimeInterface[] $departureTime
125
     *
126
     * @return static
127
     *
128
     * @see http://schema.org/departureTime
129
     */
130
    public function departureTime($departureTime)
131
    {
132
        return $this->setProperty('departureTime', $departureTime);
133
    }
134
135
    /**
136
     * A description of the item.
137
     *
138
     * @param string|string[] $description
139
     *
140
     * @return static
141
     *
142
     * @see http://schema.org/description
143
     */
144
    public function description($description)
145
    {
146
        return $this->setProperty('description', $description);
147
    }
148
149
    /**
150
     * A sub property of description. A short description of the item used to
151
     * disambiguate from other, similar items. Information from other properties
152
     * (in particular, name) may be necessary for the description to be useful
153
     * for disambiguation.
154
     *
155
     * @param string|string[] $disambiguatingDescription
156
     *
157
     * @return static
158
     *
159
     * @see http://schema.org/disambiguatingDescription
160
     */
161
    public function disambiguatingDescription($disambiguatingDescription)
162
    {
163
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
164
    }
165
166
    /**
167
     * The identifier property represents any kind of identifier for any kind of
168
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
169
     * dedicated properties for representing many of these, either as textual
170
     * strings or as URL (URI) links. See [background
171
     * notes](/docs/datamodel.html#identifierBg) for more details.
172
     *
173
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
174
     *
175
     * @return static
176
     *
177
     * @see http://schema.org/identifier
178
     */
179
    public function identifier($identifier)
180
    {
181
        return $this->setProperty('identifier', $identifier);
182
    }
183
184
    /**
185
     * An image of the item. This can be a [[URL]] or a fully described
186
     * [[ImageObject]].
187
     *
188
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
189
     *
190
     * @return static
191
     *
192
     * @see http://schema.org/image
193
     */
194
    public function image($image)
195
    {
196
        return $this->setProperty('image', $image);
197
    }
198
199
    /**
200
     * Indicates a page (or other CreativeWork) for which this thing is the main
201
     * entity being described. See [background
202
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
203
     *
204
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
205
     *
206
     * @return static
207
     *
208
     * @see http://schema.org/mainEntityOfPage
209
     */
210
    public function mainEntityOfPage($mainEntityOfPage)
211
    {
212
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
213
    }
214
215
    /**
216
     * The name of the item.
217
     *
218
     * @param string|string[] $name
219
     *
220
     * @return static
221
     *
222
     * @see http://schema.org/name
223
     */
224
    public function name($name)
225
    {
226
        return $this->setProperty('name', $name);
227
    }
228
229
    /**
230
     * An offer to provide this item&#x2014;for example, an offer to sell a
231
     * product, rent the DVD of a movie, perform a service, or give away tickets
232
     * to an event. Use [[businessFunction]] to indicate the kind of transaction
233
     * offered, i.e. sell, lease, etc. This property can also be used to
234
     * describe a [[Demand]]. While this property is listed as expected on a
235
     * number of common types, it can be used in others. In that case, using a
236
     * second type, such as Product or a subtype of Product, can clarify the
237
     * nature of the offer.
238
     *
239
     * @param \Spatie\SchemaOrg\Contracts\DemandContract|\Spatie\SchemaOrg\Contracts\DemandContract[]|\Spatie\SchemaOrg\Contracts\OfferContract|\Spatie\SchemaOrg\Contracts\OfferContract[] $offers
240
     *
241
     * @return static
242
     *
243
     * @see http://schema.org/offers
244
     */
245
    public function offers($offers)
246
    {
247
        return $this->setProperty('offers', $offers);
248
    }
249
250
    /**
251
     * Indicates a potential Action, which describes an idealized action in
252
     * which this thing would play an 'object' role.
253
     *
254
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
255
     *
256
     * @return static
257
     *
258
     * @see http://schema.org/potentialAction
259
     */
260
    public function potentialAction($potentialAction)
261
    {
262
        return $this->setProperty('potentialAction', $potentialAction);
263
    }
264
265
    /**
266
     * The service provider, service operator, or service performer; the goods
267
     * producer. Another party (a seller) may offer those services or goods on
268
     * behalf of the provider. A provider may also serve as the seller.
269
     *
270
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $provider
271
     *
272
     * @return static
273
     *
274
     * @see http://schema.org/provider
275
     */
276
    public function provider($provider)
277
    {
278
        return $this->setProperty('provider', $provider);
279
    }
280
281
    /**
282
     * URL of a reference Web page that unambiguously indicates the item's
283
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
284
     * official website.
285
     *
286
     * @param string|string[] $sameAs
287
     *
288
     * @return static
289
     *
290
     * @see http://schema.org/sameAs
291
     */
292
    public function sameAs($sameAs)
293
    {
294
        return $this->setProperty('sameAs', $sameAs);
295
    }
296
297
    /**
298
     * A CreativeWork or Event about this Thing.
299
     *
300
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
301
     *
302
     * @return static
303
     *
304
     * @see http://schema.org/subjectOf
305
     */
306
    public function subjectOf($subjectOf)
307
    {
308
        return $this->setProperty('subjectOf', $subjectOf);
309
    }
310
311
    /**
312
     * The name of the train (e.g. The Orient Express).
313
     *
314
     * @param string|string[] $trainName
315
     *
316
     * @return static
317
     *
318
     * @see http://schema.org/trainName
319
     */
320
    public function trainName($trainName)
321
    {
322
        return $this->setProperty('trainName', $trainName);
323
    }
324
325
    /**
326
     * The unique identifier for the train.
327
     *
328
     * @param string|string[] $trainNumber
329
     *
330
     * @return static
331
     *
332
     * @see http://schema.org/trainNumber
333
     */
334
    public function trainNumber($trainNumber)
335
    {
336
        return $this->setProperty('trainNumber', $trainNumber);
337
    }
338
339
    /**
340
     * URL of the item.
341
     *
342
     * @param string|string[] $url
343
     *
344
     * @return static
345
     *
346
     * @see http://schema.org/url
347
     */
348
    public function url($url)
349
    {
350
        return $this->setProperty('url', $url);
351
    }
352
353
}
354