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/DayOfWeek.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\DayOfWeekContract;
6
use \Spatie\SchemaOrg\Contracts\EnumerationContract;
7
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
8
use \Spatie\SchemaOrg\Contracts\ThingContract;
9
10
/**
11
 * The day of the week, e.g. used to specify to which day the opening hours of
12
 * an OpeningHoursSpecification refer.
13
 * 
14
 * Originally, URLs from [GoodRelations](http://purl.org/goodrelations/v1) were
15
 * used (for [[Monday]], [[Tuesday]], [[Wednesday]], [[Thursday]], [[Friday]],
16
 * [[Saturday]], [[Sunday]] plus a special entry for [[PublicHolidays]]); these
17
 * have now been integrated directly into schema.org.
18
 *
19
 * @see http://schema.org/DayOfWeek
20
 *
21
 */
22 View Code Duplication
class DayOfWeek extends BaseType implements DayOfWeekContract, EnumerationContract, 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...
23
{
24
    /**
25
     * The day of the week between Thursday and Saturday.
26
     *
27
     * @see http://schema.org/Friday
28
     */
29
     const Friday = 'http://schema.org/Friday';
30
31
    /**
32
     * The day of the week between Sunday and Tuesday.
33
     *
34
     * @see http://schema.org/Monday
35
     */
36
     const Monday = 'http://schema.org/Monday';
37
38
    /**
39
     * This stands for any day that is a public holiday; it is a placeholder for
40
     * all official public holidays in some particular location. While not
41
     * technically a "day of the week", it can be used with
42
     * [[OpeningHoursSpecification]]. In the context of an opening hours
43
     * specification it can be used to indicate opening hours on public
44
     * holidays, overriding general opening hours for the day of the week on
45
     * which a public holiday occurs.
46
     *
47
     * @see http://schema.org/PublicHolidays
48
     */
49
     const PublicHolidays = 'http://schema.org/PublicHolidays';
50
51
    /**
52
     * The day of the week between Friday and Sunday.
53
     *
54
     * @see http://schema.org/Saturday
55
     */
56
     const Saturday = 'http://schema.org/Saturday';
57
58
    /**
59
     * The day of the week between Saturday and Monday.
60
     *
61
     * @see http://schema.org/Sunday
62
     */
63
     const Sunday = 'http://schema.org/Sunday';
64
65
    /**
66
     * The day of the week between Wednesday and Friday.
67
     *
68
     * @see http://schema.org/Thursday
69
     */
70
     const Thursday = 'http://schema.org/Thursday';
71
72
    /**
73
     * The day of the week between Monday and Wednesday.
74
     *
75
     * @see http://schema.org/Tuesday
76
     */
77
     const Tuesday = 'http://schema.org/Tuesday';
78
79
    /**
80
     * The day of the week between Tuesday and Thursday.
81
     *
82
     * @see http://schema.org/Wednesday
83
     */
84
     const Wednesday = 'http://schema.org/Wednesday';
85
86
    /**
87
     * An additional type for the item, typically used for adding more specific
88
     * types from external vocabularies in microdata syntax. This is a
89
     * relationship between something and a class that the thing is in. In RDFa
90
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
91
     * attribute - for multiple types. Schema.org tools may have only weaker
92
     * understanding of extra types, in particular those defined externally.
93
     *
94
     * @param string|string[] $additionalType
95
     *
96
     * @return static
97
     *
98
     * @see http://schema.org/additionalType
99
     */
100
    public function additionalType($additionalType)
101
    {
102
        return $this->setProperty('additionalType', $additionalType);
103
    }
104
105
    /**
106
     * An alias for the item.
107
     *
108
     * @param string|string[] $alternateName
109
     *
110
     * @return static
111
     *
112
     * @see http://schema.org/alternateName
113
     */
114
    public function alternateName($alternateName)
115
    {
116
        return $this->setProperty('alternateName', $alternateName);
117
    }
118
119
    /**
120
     * A description of the item.
121
     *
122
     * @param string|string[] $description
123
     *
124
     * @return static
125
     *
126
     * @see http://schema.org/description
127
     */
128
    public function description($description)
129
    {
130
        return $this->setProperty('description', $description);
131
    }
132
133
    /**
134
     * A sub property of description. A short description of the item used to
135
     * disambiguate from other, similar items. Information from other properties
136
     * (in particular, name) may be necessary for the description to be useful
137
     * for disambiguation.
138
     *
139
     * @param string|string[] $disambiguatingDescription
140
     *
141
     * @return static
142
     *
143
     * @see http://schema.org/disambiguatingDescription
144
     */
145
    public function disambiguatingDescription($disambiguatingDescription)
146
    {
147
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
148
    }
149
150
    /**
151
     * The identifier property represents any kind of identifier for any kind of
152
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
153
     * dedicated properties for representing many of these, either as textual
154
     * strings or as URL (URI) links. See [background
155
     * notes](/docs/datamodel.html#identifierBg) for more details.
156
     *
157
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
158
     *
159
     * @return static
160
     *
161
     * @see http://schema.org/identifier
162
     */
163
    public function identifier($identifier)
164
    {
165
        return $this->setProperty('identifier', $identifier);
166
    }
167
168
    /**
169
     * An image of the item. This can be a [[URL]] or a fully described
170
     * [[ImageObject]].
171
     *
172
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
173
     *
174
     * @return static
175
     *
176
     * @see http://schema.org/image
177
     */
178
    public function image($image)
179
    {
180
        return $this->setProperty('image', $image);
181
    }
182
183
    /**
184
     * Indicates a page (or other CreativeWork) for which this thing is the main
185
     * entity being described. See [background
186
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
187
     *
188
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
189
     *
190
     * @return static
191
     *
192
     * @see http://schema.org/mainEntityOfPage
193
     */
194
    public function mainEntityOfPage($mainEntityOfPage)
195
    {
196
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
197
    }
198
199
    /**
200
     * The name of the item.
201
     *
202
     * @param string|string[] $name
203
     *
204
     * @return static
205
     *
206
     * @see http://schema.org/name
207
     */
208
    public function name($name)
209
    {
210
        return $this->setProperty('name', $name);
211
    }
212
213
    /**
214
     * Indicates a potential Action, which describes an idealized action in
215
     * which this thing would play an 'object' role.
216
     *
217
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
218
     *
219
     * @return static
220
     *
221
     * @see http://schema.org/potentialAction
222
     */
223
    public function potentialAction($potentialAction)
224
    {
225
        return $this->setProperty('potentialAction', $potentialAction);
226
    }
227
228
    /**
229
     * URL of a reference Web page that unambiguously indicates the item's
230
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
231
     * official website.
232
     *
233
     * @param string|string[] $sameAs
234
     *
235
     * @return static
236
     *
237
     * @see http://schema.org/sameAs
238
     */
239
    public function sameAs($sameAs)
240
    {
241
        return $this->setProperty('sameAs', $sameAs);
242
    }
243
244
    /**
245
     * A CreativeWork or Event about this Thing.
246
     *
247
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
248
     *
249
     * @return static
250
     *
251
     * @see http://schema.org/subjectOf
252
     */
253
    public function subjectOf($subjectOf)
254
    {
255
        return $this->setProperty('subjectOf', $subjectOf);
256
    }
257
258
    /**
259
     * URL of the item.
260
     *
261
     * @param string|string[] $url
262
     *
263
     * @return static
264
     *
265
     * @see http://schema.org/url
266
     */
267
    public function url($url)
268
    {
269
        return $this->setProperty('url', $url);
270
    }
271
272
}
273