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/GeoShape.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\GeoShapeContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\StructuredValueContract;
8
use \Spatie\SchemaOrg\Contracts\ThingContract;
9
10
/**
11
 * The geographic shape of a place. A GeoShape can be described using several
12
 * properties whose values are based on latitude/longitude pairs. Either
13
 * whitespace or commas can be used to separate latitude and longitude;
14
 * whitespace should be used when writing a list of several such points.
15
 *
16
 * @see http://schema.org/GeoShape
17
 *
18
 */
19 View Code Duplication
class GeoShape extends BaseType implements GeoShapeContract, IntangibleContract, 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...
20
{
21
    /**
22
     * An additional type for the item, typically used for adding more specific
23
     * types from external vocabularies in microdata syntax. This is a
24
     * relationship between something and a class that the thing is in. In RDFa
25
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
26
     * attribute - for multiple types. Schema.org tools may have only weaker
27
     * understanding of extra types, in particular those defined externally.
28
     *
29
     * @param string|string[] $additionalType
30
     *
31
     * @return static
32
     *
33
     * @see http://schema.org/additionalType
34
     */
35
    public function additionalType($additionalType)
36
    {
37
        return $this->setProperty('additionalType', $additionalType);
38
    }
39
40
    /**
41
     * Physical address of the item.
42
     *
43
     * @param \Spatie\SchemaOrg\Contracts\PostalAddressContract|\Spatie\SchemaOrg\Contracts\PostalAddressContract[]|string|string[] $address
44
     *
45
     * @return static
46
     *
47
     * @see http://schema.org/address
48
     */
49
    public function address($address)
50
    {
51
        return $this->setProperty('address', $address);
52
    }
53
54
    /**
55
     * The country. For example, USA. You can also provide the two-letter [ISO
56
     * 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1).
57
     *
58
     * @param \Spatie\SchemaOrg\Contracts\CountryContract|\Spatie\SchemaOrg\Contracts\CountryContract[]|string|string[] $addressCountry
59
     *
60
     * @return static
61
     *
62
     * @see http://schema.org/addressCountry
63
     */
64
    public function addressCountry($addressCountry)
65
    {
66
        return $this->setProperty('addressCountry', $addressCountry);
67
    }
68
69
    /**
70
     * An alias for the item.
71
     *
72
     * @param string|string[] $alternateName
73
     *
74
     * @return static
75
     *
76
     * @see http://schema.org/alternateName
77
     */
78
    public function alternateName($alternateName)
79
    {
80
        return $this->setProperty('alternateName', $alternateName);
81
    }
82
83
    /**
84
     * A box is the area enclosed by the rectangle formed by two points. The
85
     * first point is the lower corner, the second point is the upper corner. A
86
     * box is expressed as two points separated by a space character.
87
     *
88
     * @param string|string[] $box
89
     *
90
     * @return static
91
     *
92
     * @see http://schema.org/box
93
     */
94
    public function box($box)
95
    {
96
        return $this->setProperty('box', $box);
97
    }
98
99
    /**
100
     * A circle is the circular region of a specified radius centered at a
101
     * specified latitude and longitude. A circle is expressed as a pair
102
     * followed by a radius in meters.
103
     *
104
     * @param string|string[] $circle
105
     *
106
     * @return static
107
     *
108
     * @see http://schema.org/circle
109
     */
110
    public function circle($circle)
111
    {
112
        return $this->setProperty('circle', $circle);
113
    }
114
115
    /**
116
     * A description of the item.
117
     *
118
     * @param string|string[] $description
119
     *
120
     * @return static
121
     *
122
     * @see http://schema.org/description
123
     */
124
    public function description($description)
125
    {
126
        return $this->setProperty('description', $description);
127
    }
128
129
    /**
130
     * A sub property of description. A short description of the item used to
131
     * disambiguate from other, similar items. Information from other properties
132
     * (in particular, name) may be necessary for the description to be useful
133
     * for disambiguation.
134
     *
135
     * @param string|string[] $disambiguatingDescription
136
     *
137
     * @return static
138
     *
139
     * @see http://schema.org/disambiguatingDescription
140
     */
141
    public function disambiguatingDescription($disambiguatingDescription)
142
    {
143
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
144
    }
145
146
    /**
147
     * The elevation of a location ([WGS
148
     * 84](https://en.wikipedia.org/wiki/World_Geodetic_System)). Values may be
149
     * of the form 'NUMBER UNIT_OF_MEASUREMENT' (e.g., '1,000 m', '3,200 ft')
150
     * while numbers alone should be assumed to be a value in meters.
151
     *
152
     * @param float|float[]|int|int[]|string|string[] $elevation
153
     *
154
     * @return static
155
     *
156
     * @see http://schema.org/elevation
157
     */
158
    public function elevation($elevation)
159
    {
160
        return $this->setProperty('elevation', $elevation);
161
    }
162
163
    /**
164
     * Indicates the GeoCoordinates at the centre of a GeoShape e.g. GeoCircle.
165
     *
166
     * @param \Spatie\SchemaOrg\Contracts\GeoCoordinatesContract|\Spatie\SchemaOrg\Contracts\GeoCoordinatesContract[] $geoMidpoint
167
     *
168
     * @return static
169
     *
170
     * @see http://schema.org/geoMidpoint
171
     */
172
    public function geoMidpoint($geoMidpoint)
173
    {
174
        return $this->setProperty('geoMidpoint', $geoMidpoint);
175
    }
176
177
    /**
178
     * The identifier property represents any kind of identifier for any kind of
179
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
180
     * dedicated properties for representing many of these, either as textual
181
     * strings or as URL (URI) links. See [background
182
     * notes](/docs/datamodel.html#identifierBg) for more details.
183
     *
184
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
185
     *
186
     * @return static
187
     *
188
     * @see http://schema.org/identifier
189
     */
190
    public function identifier($identifier)
191
    {
192
        return $this->setProperty('identifier', $identifier);
193
    }
194
195
    /**
196
     * An image of the item. This can be a [[URL]] or a fully described
197
     * [[ImageObject]].
198
     *
199
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
200
     *
201
     * @return static
202
     *
203
     * @see http://schema.org/image
204
     */
205
    public function image($image)
206
    {
207
        return $this->setProperty('image', $image);
208
    }
209
210
    /**
211
     * A line is a point-to-point path consisting of two or more points. A line
212
     * is expressed as a series of two or more point objects separated by space.
213
     *
214
     * @param string|string[] $line
215
     *
216
     * @return static
217
     *
218
     * @see http://schema.org/line
219
     */
220
    public function line($line)
221
    {
222
        return $this->setProperty('line', $line);
223
    }
224
225
    /**
226
     * Indicates a page (or other CreativeWork) for which this thing is the main
227
     * entity being described. See [background
228
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
229
     *
230
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
231
     *
232
     * @return static
233
     *
234
     * @see http://schema.org/mainEntityOfPage
235
     */
236
    public function mainEntityOfPage($mainEntityOfPage)
237
    {
238
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
239
    }
240
241
    /**
242
     * The name of the item.
243
     *
244
     * @param string|string[] $name
245
     *
246
     * @return static
247
     *
248
     * @see http://schema.org/name
249
     */
250
    public function name($name)
251
    {
252
        return $this->setProperty('name', $name);
253
    }
254
255
    /**
256
     * A polygon is the area enclosed by a point-to-point path for which the
257
     * starting and ending points are the same. A polygon is expressed as a
258
     * series of four or more space delimited points where the first and final
259
     * points are identical.
260
     *
261
     * @param string|string[] $polygon
262
     *
263
     * @return static
264
     *
265
     * @see http://schema.org/polygon
266
     */
267
    public function polygon($polygon)
268
    {
269
        return $this->setProperty('polygon', $polygon);
270
    }
271
272
    /**
273
     * The postal code. For example, 94043.
274
     *
275
     * @param string|string[] $postalCode
276
     *
277
     * @return static
278
     *
279
     * @see http://schema.org/postalCode
280
     */
281
    public function postalCode($postalCode)
282
    {
283
        return $this->setProperty('postalCode', $postalCode);
284
    }
285
286
    /**
287
     * Indicates a potential Action, which describes an idealized action in
288
     * which this thing would play an 'object' role.
289
     *
290
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
291
     *
292
     * @return static
293
     *
294
     * @see http://schema.org/potentialAction
295
     */
296
    public function potentialAction($potentialAction)
297
    {
298
        return $this->setProperty('potentialAction', $potentialAction);
299
    }
300
301
    /**
302
     * URL of a reference Web page that unambiguously indicates the item's
303
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
304
     * official website.
305
     *
306
     * @param string|string[] $sameAs
307
     *
308
     * @return static
309
     *
310
     * @see http://schema.org/sameAs
311
     */
312
    public function sameAs($sameAs)
313
    {
314
        return $this->setProperty('sameAs', $sameAs);
315
    }
316
317
    /**
318
     * A CreativeWork or Event about this Thing.
319
     *
320
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
321
     *
322
     * @return static
323
     *
324
     * @see http://schema.org/subjectOf
325
     */
326
    public function subjectOf($subjectOf)
327
    {
328
        return $this->setProperty('subjectOf', $subjectOf);
329
    }
330
331
    /**
332
     * URL of the item.
333
     *
334
     * @param string|string[] $url
335
     *
336
     * @return static
337
     *
338
     * @see http://schema.org/url
339
     */
340
    public function url($url)
341
    {
342
        return $this->setProperty('url', $url);
343
    }
344
345
}
346