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