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/VoteAction.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\VoteActionContract;
6
use \Spatie\SchemaOrg\Contracts\ActionContract;
7
use \Spatie\SchemaOrg\Contracts\AssessActionContract;
8
use \Spatie\SchemaOrg\Contracts\ChooseActionContract;
9
use \Spatie\SchemaOrg\Contracts\ThingContract;
10
11
/**
12
 * The act of expressing a preference from a fixed/finite/structured set of
13
 * choices/options.
14
 *
15
 * @see http://schema.org/VoteAction
16
 *
17
 */
18 View Code Duplication
class VoteAction extends BaseType implements VoteActionContract, ActionContract, AssessActionContract, ChooseActionContract, 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...
19
{
20
    /**
21
     * A sub property of object. The options subject to this action.
22
     *
23
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[]|string|string[] $actionOption
24
     *
25
     * @return static
26
     *
27
     * @see http://schema.org/actionOption
28
     */
29
    public function actionOption($actionOption)
30
    {
31
        return $this->setProperty('actionOption', $actionOption);
32
    }
33
34
    /**
35
     * Indicates the current disposition of the Action.
36
     *
37
     * @param \Spatie\SchemaOrg\Contracts\ActionStatusTypeContract|\Spatie\SchemaOrg\Contracts\ActionStatusTypeContract[] $actionStatus
38
     *
39
     * @return static
40
     *
41
     * @see http://schema.org/actionStatus
42
     */
43
    public function actionStatus($actionStatus)
44
    {
45
        return $this->setProperty('actionStatus', $actionStatus);
46
    }
47
48
    /**
49
     * An additional type for the item, typically used for adding more specific
50
     * types from external vocabularies in microdata syntax. This is a
51
     * relationship between something and a class that the thing is in. In RDFa
52
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
53
     * attribute - for multiple types. Schema.org tools may have only weaker
54
     * understanding of extra types, in particular those defined externally.
55
     *
56
     * @param string|string[] $additionalType
57
     *
58
     * @return static
59
     *
60
     * @see http://schema.org/additionalType
61
     */
62
    public function additionalType($additionalType)
63
    {
64
        return $this->setProperty('additionalType', $additionalType);
65
    }
66
67
    /**
68
     * The direct performer or driver of the action (animate or inanimate). e.g.
69
     * *John* wrote a book.
70
     *
71
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $agent
72
     *
73
     * @return static
74
     *
75
     * @see http://schema.org/agent
76
     */
77
    public function agent($agent)
78
    {
79
        return $this->setProperty('agent', $agent);
80
    }
81
82
    /**
83
     * An alias for the item.
84
     *
85
     * @param string|string[] $alternateName
86
     *
87
     * @return static
88
     *
89
     * @see http://schema.org/alternateName
90
     */
91
    public function alternateName($alternateName)
92
    {
93
        return $this->setProperty('alternateName', $alternateName);
94
    }
95
96
    /**
97
     * A sub property of object. The candidate subject of this action.
98
     *
99
     * @param \Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $candidate
100
     *
101
     * @return static
102
     *
103
     * @see http://schema.org/candidate
104
     */
105
    public function candidate($candidate)
106
    {
107
        return $this->setProperty('candidate', $candidate);
108
    }
109
110
    /**
111
     * A description of the item.
112
     *
113
     * @param string|string[] $description
114
     *
115
     * @return static
116
     *
117
     * @see http://schema.org/description
118
     */
119
    public function description($description)
120
    {
121
        return $this->setProperty('description', $description);
122
    }
123
124
    /**
125
     * A sub property of description. A short description of the item used to
126
     * disambiguate from other, similar items. Information from other properties
127
     * (in particular, name) may be necessary for the description to be useful
128
     * for disambiguation.
129
     *
130
     * @param string|string[] $disambiguatingDescription
131
     *
132
     * @return static
133
     *
134
     * @see http://schema.org/disambiguatingDescription
135
     */
136
    public function disambiguatingDescription($disambiguatingDescription)
137
    {
138
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
139
    }
140
141
    /**
142
     * The endTime of something. For a reserved event or service (e.g.
143
     * FoodEstablishmentReservation), the time that it is expected to end. For
144
     * actions that span a period of time, when the action was performed. e.g.
145
     * John wrote a book from January to *December*. For media, including audio
146
     * and video, it's the time offset of the end of a clip within a larger
147
     * file.
148
     * 
149
     * Note that Event uses startDate/endDate instead of startTime/endTime, even
150
     * when describing dates with times. This situation may be clarified in
151
     * future revisions.
152
     *
153
     * @param \DateTimeInterface|\DateTimeInterface[] $endTime
154
     *
155
     * @return static
156
     *
157
     * @see http://schema.org/endTime
158
     */
159
    public function endTime($endTime)
160
    {
161
        return $this->setProperty('endTime', $endTime);
162
    }
163
164
    /**
165
     * For failed actions, more information on the cause of the failure.
166
     *
167
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $error
168
     *
169
     * @return static
170
     *
171
     * @see http://schema.org/error
172
     */
173
    public function error($error)
174
    {
175
        return $this->setProperty('error', $error);
176
    }
177
178
    /**
179
     * The identifier property represents any kind of identifier for any kind of
180
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
181
     * dedicated properties for representing many of these, either as textual
182
     * strings or as URL (URI) links. See [background
183
     * notes](/docs/datamodel.html#identifierBg) for more details.
184
     *
185
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
186
     *
187
     * @return static
188
     *
189
     * @see http://schema.org/identifier
190
     */
191
    public function identifier($identifier)
192
    {
193
        return $this->setProperty('identifier', $identifier);
194
    }
195
196
    /**
197
     * An image of the item. This can be a [[URL]] or a fully described
198
     * [[ImageObject]].
199
     *
200
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
201
     *
202
     * @return static
203
     *
204
     * @see http://schema.org/image
205
     */
206
    public function image($image)
207
    {
208
        return $this->setProperty('image', $image);
209
    }
210
211
    /**
212
     * The object that helped the agent perform the action. e.g. John wrote a
213
     * book with *a pen*.
214
     *
215
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $instrument
216
     *
217
     * @return static
218
     *
219
     * @see http://schema.org/instrument
220
     */
221
    public function instrument($instrument)
222
    {
223
        return $this->setProperty('instrument', $instrument);
224
    }
225
226
    /**
227
     * The location of for example where the event is happening, an organization
228
     * is located, or where an action takes place.
229
     *
230
     * @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[]|\Spatie\SchemaOrg\Contracts\PostalAddressContract|\Spatie\SchemaOrg\Contracts\PostalAddressContract[]|string|string[] $location
231
     *
232
     * @return static
233
     *
234
     * @see http://schema.org/location
235
     */
236
    public function location($location)
237
    {
238
        return $this->setProperty('location', $location);
239
    }
240
241
    /**
242
     * Indicates a page (or other CreativeWork) for which this thing is the main
243
     * entity being described. See [background
244
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
245
     *
246
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
247
     *
248
     * @return static
249
     *
250
     * @see http://schema.org/mainEntityOfPage
251
     */
252
    public function mainEntityOfPage($mainEntityOfPage)
253
    {
254
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
255
    }
256
257
    /**
258
     * The name of the item.
259
     *
260
     * @param string|string[] $name
261
     *
262
     * @return static
263
     *
264
     * @see http://schema.org/name
265
     */
266
    public function name($name)
267
    {
268
        return $this->setProperty('name', $name);
269
    }
270
271
    /**
272
     * The object upon which the action is carried out, whose state is kept
273
     * intact or changed. Also known as the semantic roles patient, affected or
274
     * undergoer (which change their state) or theme (which doesn't). e.g. John
275
     * read *a book*.
276
     *
277
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $object
278
     *
279
     * @return static
280
     *
281
     * @see http://schema.org/object
282
     */
283
    public function object($object)
284
    {
285
        return $this->setProperty('object', $object);
286
    }
287
288
    /**
289
     * A sub property of object. The options subject to this action.
290
     *
291
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[]|string|string[] $option
292
     *
293
     * @return static
294
     *
295
     * @see http://schema.org/option
296
     */
297
    public function option($option)
298
    {
299
        return $this->setProperty('option', $option);
300
    }
301
302
    /**
303
     * Other co-agents that participated in the action indirectly. e.g. John
304
     * wrote a book with *Steve*.
305
     *
306
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $participant
307
     *
308
     * @return static
309
     *
310
     * @see http://schema.org/participant
311
     */
312
    public function participant($participant)
313
    {
314
        return $this->setProperty('participant', $participant);
315
    }
316
317
    /**
318
     * Indicates a potential Action, which describes an idealized action in
319
     * which this thing would play an 'object' role.
320
     *
321
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
322
     *
323
     * @return static
324
     *
325
     * @see http://schema.org/potentialAction
326
     */
327
    public function potentialAction($potentialAction)
328
    {
329
        return $this->setProperty('potentialAction', $potentialAction);
330
    }
331
332
    /**
333
     * The result produced in the action. e.g. John wrote *a book*.
334
     *
335
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $result
336
     *
337
     * @return static
338
     *
339
     * @see http://schema.org/result
340
     */
341
    public function result($result)
342
    {
343
        return $this->setProperty('result', $result);
344
    }
345
346
    /**
347
     * URL of a reference Web page that unambiguously indicates the item's
348
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
349
     * official website.
350
     *
351
     * @param string|string[] $sameAs
352
     *
353
     * @return static
354
     *
355
     * @see http://schema.org/sameAs
356
     */
357
    public function sameAs($sameAs)
358
    {
359
        return $this->setProperty('sameAs', $sameAs);
360
    }
361
362
    /**
363
     * The startTime of something. For a reserved event or service (e.g.
364
     * FoodEstablishmentReservation), the time that it is expected to start. For
365
     * actions that span a period of time, when the action was performed. e.g.
366
     * John wrote a book from *January* to December. For media, including audio
367
     * and video, it's the time offset of the start of a clip within a larger
368
     * file.
369
     * 
370
     * Note that Event uses startDate/endDate instead of startTime/endTime, even
371
     * when describing dates with times. This situation may be clarified in
372
     * future revisions.
373
     *
374
     * @param \DateTimeInterface|\DateTimeInterface[] $startTime
375
     *
376
     * @return static
377
     *
378
     * @see http://schema.org/startTime
379
     */
380
    public function startTime($startTime)
381
    {
382
        return $this->setProperty('startTime', $startTime);
383
    }
384
385
    /**
386
     * A CreativeWork or Event about this Thing.
387
     *
388
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
389
     *
390
     * @return static
391
     *
392
     * @see http://schema.org/subjectOf
393
     */
394
    public function subjectOf($subjectOf)
395
    {
396
        return $this->setProperty('subjectOf', $subjectOf);
397
    }
398
399
    /**
400
     * Indicates a target EntryPoint for an Action.
401
     *
402
     * @param \Spatie\SchemaOrg\Contracts\EntryPointContract|\Spatie\SchemaOrg\Contracts\EntryPointContract[] $target
403
     *
404
     * @return static
405
     *
406
     * @see http://schema.org/target
407
     */
408
    public function target($target)
409
    {
410
        return $this->setProperty('target', $target);
411
    }
412
413
    /**
414
     * URL of the item.
415
     *
416
     * @param string|string[] $url
417
     *
418
     * @return static
419
     *
420
     * @see http://schema.org/url
421
     */
422
    public function url($url)
423
    {
424
        return $this->setProperty('url', $url);
425
    }
426
427
}
428