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