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