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