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/Rating.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\RatingContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
9
/**
10
 * A rating is an evaluation on a numeric scale, such as 1 to 5 stars.
11
 *
12
 * @see http://schema.org/Rating
13
 *
14
 */
15 View Code Duplication
class Rating extends BaseType implements RatingContract, 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...
16
{
17
    /**
18
     * An additional type for the item, typically used for adding more specific
19
     * types from external vocabularies in microdata syntax. This is a
20
     * relationship between something and a class that the thing is in. In RDFa
21
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
22
     * attribute - for multiple types. Schema.org tools may have only weaker
23
     * understanding of extra types, in particular those defined externally.
24
     *
25
     * @param string|string[] $additionalType
26
     *
27
     * @return static
28
     *
29
     * @see http://schema.org/additionalType
30
     */
31
    public function additionalType($additionalType)
32
    {
33
        return $this->setProperty('additionalType', $additionalType);
34
    }
35
36
    /**
37
     * An alias for the item.
38
     *
39
     * @param string|string[] $alternateName
40
     *
41
     * @return static
42
     *
43
     * @see http://schema.org/alternateName
44
     */
45
    public function alternateName($alternateName)
46
    {
47
        return $this->setProperty('alternateName', $alternateName);
48
    }
49
50
    /**
51
     * The author of this content or rating. Please note that author is special
52
     * in that HTML 5 provides a special mechanism for indicating authorship via
53
     * the rel tag. That is equivalent to this and may be used interchangeably.
54
     *
55
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $author
56
     *
57
     * @return static
58
     *
59
     * @see http://schema.org/author
60
     */
61
    public function author($author)
62
    {
63
        return $this->setProperty('author', $author);
64
    }
65
66
    /**
67
     * The highest value allowed in this rating system. If bestRating is
68
     * omitted, 5 is assumed.
69
     *
70
     * @param float|float[]|int|int[]|string|string[] $bestRating
71
     *
72
     * @return static
73
     *
74
     * @see http://schema.org/bestRating
75
     */
76
    public function bestRating($bestRating)
77
    {
78
        return $this->setProperty('bestRating', $bestRating);
79
    }
80
81
    /**
82
     * A description of the item.
83
     *
84
     * @param string|string[] $description
85
     *
86
     * @return static
87
     *
88
     * @see http://schema.org/description
89
     */
90
    public function description($description)
91
    {
92
        return $this->setProperty('description', $description);
93
    }
94
95
    /**
96
     * A sub property of description. A short description of the item used to
97
     * disambiguate from other, similar items. Information from other properties
98
     * (in particular, name) may be necessary for the description to be useful
99
     * for disambiguation.
100
     *
101
     * @param string|string[] $disambiguatingDescription
102
     *
103
     * @return static
104
     *
105
     * @see http://schema.org/disambiguatingDescription
106
     */
107
    public function disambiguatingDescription($disambiguatingDescription)
108
    {
109
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
110
    }
111
112
    /**
113
     * The identifier property represents any kind of identifier for any kind of
114
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
115
     * dedicated properties for representing many of these, either as textual
116
     * strings or as URL (URI) links. See [background
117
     * notes](/docs/datamodel.html#identifierBg) for more details.
118
     *
119
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
120
     *
121
     * @return static
122
     *
123
     * @see http://schema.org/identifier
124
     */
125
    public function identifier($identifier)
126
    {
127
        return $this->setProperty('identifier', $identifier);
128
    }
129
130
    /**
131
     * An image of the item. This can be a [[URL]] or a fully described
132
     * [[ImageObject]].
133
     *
134
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
135
     *
136
     * @return static
137
     *
138
     * @see http://schema.org/image
139
     */
140
    public function image($image)
141
    {
142
        return $this->setProperty('image', $image);
143
    }
144
145
    /**
146
     * Indicates a page (or other CreativeWork) for which this thing is the main
147
     * entity being described. See [background
148
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
149
     *
150
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
151
     *
152
     * @return static
153
     *
154
     * @see http://schema.org/mainEntityOfPage
155
     */
156
    public function mainEntityOfPage($mainEntityOfPage)
157
    {
158
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
159
    }
160
161
    /**
162
     * The name of the item.
163
     *
164
     * @param string|string[] $name
165
     *
166
     * @return static
167
     *
168
     * @see http://schema.org/name
169
     */
170
    public function name($name)
171
    {
172
        return $this->setProperty('name', $name);
173
    }
174
175
    /**
176
     * Indicates a potential Action, which describes an idealized action in
177
     * which this thing would play an 'object' role.
178
     *
179
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
180
     *
181
     * @return static
182
     *
183
     * @see http://schema.org/potentialAction
184
     */
185
    public function potentialAction($potentialAction)
186
    {
187
        return $this->setProperty('potentialAction', $potentialAction);
188
    }
189
190
    /**
191
     * The rating for the content.
192
     * 
193
     * Usage guidelines:
194
     * 
195
     * * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT
196
     * NINE' (U+0039)) rather than superficially similiar Unicode symbols.
197
     * * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a
198
     * decimal point. Avoid using these symbols as a readability separator.
199
     *
200
     * @param float|float[]|int|int[]|string|string[] $ratingValue
201
     *
202
     * @return static
203
     *
204
     * @see http://schema.org/ratingValue
205
     */
206
    public function ratingValue($ratingValue)
207
    {
208
        return $this->setProperty('ratingValue', $ratingValue);
209
    }
210
211
    /**
212
     * This Review or Rating is relevant to this part or facet of the
213
     * itemReviewed.
214
     *
215
     * @param string|string[] $reviewAspect
216
     *
217
     * @return static
218
     *
219
     * @see http://schema.org/reviewAspect
220
     */
221
    public function reviewAspect($reviewAspect)
222
    {
223
        return $this->setProperty('reviewAspect', $reviewAspect);
224
    }
225
226
    /**
227
     * URL of a reference Web page that unambiguously indicates the item's
228
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
229
     * official website.
230
     *
231
     * @param string|string[] $sameAs
232
     *
233
     * @return static
234
     *
235
     * @see http://schema.org/sameAs
236
     */
237
    public function sameAs($sameAs)
238
    {
239
        return $this->setProperty('sameAs', $sameAs);
240
    }
241
242
    /**
243
     * A CreativeWork or Event about this Thing.
244
     *
245
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
246
     *
247
     * @return static
248
     *
249
     * @see http://schema.org/subjectOf
250
     */
251
    public function subjectOf($subjectOf)
252
    {
253
        return $this->setProperty('subjectOf', $subjectOf);
254
    }
255
256
    /**
257
     * URL of the item.
258
     *
259
     * @param string|string[] $url
260
     *
261
     * @return static
262
     *
263
     * @see http://schema.org/url
264
     */
265
    public function url($url)
266
    {
267
        return $this->setProperty('url', $url);
268
    }
269
270
    /**
271
     * The lowest value allowed in this rating system. If worstRating is
272
     * omitted, 1 is assumed.
273
     *
274
     * @param float|float[]|int|int[]|string|string[] $worstRating
275
     *
276
     * @return static
277
     *
278
     * @see http://schema.org/worstRating
279
     */
280
    public function worstRating($worstRating)
281
    {
282
        return $this->setProperty('worstRating', $worstRating);
283
    }
284
285
}
286