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\DataFeedItemContract; |
||
6 | use \Spatie\SchemaOrg\Contracts\IntangibleContract; |
||
7 | use \Spatie\SchemaOrg\Contracts\ThingContract; |
||
8 | |||
9 | /** |
||
10 | * A single item within a larger data feed. |
||
11 | * |
||
12 | * @see http://schema.org/DataFeedItem |
||
13 | * |
||
14 | */ |
||
15 | View Code Duplication | class DataFeedItem extends BaseType implements DataFeedItemContract, IntangibleContract, ThingContract |
|
0 ignored issues
–
show
|
|||
16 | { |
||
17 | /** |
||
18 | * An additional type for the item, typically used for adding more specific |
||
19 | * types from external vocabularies in microdata syntax. This is a |
||
20 | * relationship between something and a class that the thing is in. In RDFa |
||
21 | * syntax, it is better to use the native RDFa syntax - the 'typeof' |
||
22 | * attribute - for multiple types. Schema.org tools may have only weaker |
||
23 | * understanding of extra types, in particular those defined externally. |
||
24 | * |
||
25 | * @param string|string[] $additionalType |
||
26 | * |
||
27 | * @return static |
||
28 | * |
||
29 | * @see http://schema.org/additionalType |
||
30 | */ |
||
31 | public function additionalType($additionalType) |
||
32 | { |
||
33 | return $this->setProperty('additionalType', $additionalType); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * An alias for the item. |
||
38 | * |
||
39 | * @param string|string[] $alternateName |
||
40 | * |
||
41 | * @return static |
||
42 | * |
||
43 | * @see http://schema.org/alternateName |
||
44 | */ |
||
45 | public function alternateName($alternateName) |
||
46 | { |
||
47 | return $this->setProperty('alternateName', $alternateName); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * The date on which the CreativeWork was created or the item was added to a |
||
52 | * DataFeed. |
||
53 | * |
||
54 | * @param \DateTimeInterface|\DateTimeInterface[] $dateCreated |
||
55 | * |
||
56 | * @return static |
||
57 | * |
||
58 | * @see http://schema.org/dateCreated |
||
59 | */ |
||
60 | public function dateCreated($dateCreated) |
||
61 | { |
||
62 | return $this->setProperty('dateCreated', $dateCreated); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * The datetime the item was removed from the DataFeed. |
||
67 | * |
||
68 | * @param \DateTimeInterface|\DateTimeInterface[] $dateDeleted |
||
69 | * |
||
70 | * @return static |
||
71 | * |
||
72 | * @see http://schema.org/dateDeleted |
||
73 | */ |
||
74 | public function dateDeleted($dateDeleted) |
||
75 | { |
||
76 | return $this->setProperty('dateDeleted', $dateDeleted); |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * The date on which the CreativeWork was most recently modified or when the |
||
81 | * item's entry was modified within a DataFeed. |
||
82 | * |
||
83 | * @param \DateTimeInterface|\DateTimeInterface[] $dateModified |
||
84 | * |
||
85 | * @return static |
||
86 | * |
||
87 | * @see http://schema.org/dateModified |
||
88 | */ |
||
89 | public function dateModified($dateModified) |
||
90 | { |
||
91 | return $this->setProperty('dateModified', $dateModified); |
||
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 identifier property represents any kind of identifier for any kind of |
||
127 | * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides |
||
128 | * dedicated properties for representing many of these, either as textual |
||
129 | * strings or as URL (URI) links. See [background |
||
130 | * notes](/docs/datamodel.html#identifierBg) for more details. |
||
131 | * |
||
132 | * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier |
||
133 | * |
||
134 | * @return static |
||
135 | * |
||
136 | * @see http://schema.org/identifier |
||
137 | */ |
||
138 | public function identifier($identifier) |
||
139 | { |
||
140 | return $this->setProperty('identifier', $identifier); |
||
141 | } |
||
142 | |||
143 | /** |
||
144 | * An image of the item. This can be a [[URL]] or a fully described |
||
145 | * [[ImageObject]]. |
||
146 | * |
||
147 | * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image |
||
148 | * |
||
149 | * @return static |
||
150 | * |
||
151 | * @see http://schema.org/image |
||
152 | */ |
||
153 | public function image($image) |
||
154 | { |
||
155 | return $this->setProperty('image', $image); |
||
156 | } |
||
157 | |||
158 | /** |
||
159 | * An entity represented by an entry in a list or data feed (e.g. an |
||
160 | * 'artist' in a list of 'artists')’. |
||
161 | * |
||
162 | * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $item |
||
163 | * |
||
164 | * @return static |
||
165 | * |
||
166 | * @see http://schema.org/item |
||
167 | */ |
||
168 | public function item($item) |
||
169 | { |
||
170 | return $this->setProperty('item', $item); |
||
171 | } |
||
172 | |||
173 | /** |
||
174 | * Indicates a page (or other CreativeWork) for which this thing is the main |
||
175 | * entity being described. See [background |
||
176 | * notes](/docs/datamodel.html#mainEntityBackground) for details. |
||
177 | * |
||
178 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage |
||
179 | * |
||
180 | * @return static |
||
181 | * |
||
182 | * @see http://schema.org/mainEntityOfPage |
||
183 | */ |
||
184 | public function mainEntityOfPage($mainEntityOfPage) |
||
185 | { |
||
186 | return $this->setProperty('mainEntityOfPage', $mainEntityOfPage); |
||
187 | } |
||
188 | |||
189 | /** |
||
190 | * The name of the item. |
||
191 | * |
||
192 | * @param string|string[] $name |
||
193 | * |
||
194 | * @return static |
||
195 | * |
||
196 | * @see http://schema.org/name |
||
197 | */ |
||
198 | public function name($name) |
||
199 | { |
||
200 | return $this->setProperty('name', $name); |
||
201 | } |
||
202 | |||
203 | /** |
||
204 | * Indicates a potential Action, which describes an idealized action in |
||
205 | * which this thing would play an 'object' role. |
||
206 | * |
||
207 | * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction |
||
208 | * |
||
209 | * @return static |
||
210 | * |
||
211 | * @see http://schema.org/potentialAction |
||
212 | */ |
||
213 | public function potentialAction($potentialAction) |
||
214 | { |
||
215 | return $this->setProperty('potentialAction', $potentialAction); |
||
216 | } |
||
217 | |||
218 | /** |
||
219 | * URL of a reference Web page that unambiguously indicates the item's |
||
220 | * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or |
||
221 | * official website. |
||
222 | * |
||
223 | * @param string|string[] $sameAs |
||
224 | * |
||
225 | * @return static |
||
226 | * |
||
227 | * @see http://schema.org/sameAs |
||
228 | */ |
||
229 | public function sameAs($sameAs) |
||
230 | { |
||
231 | return $this->setProperty('sameAs', $sameAs); |
||
232 | } |
||
233 | |||
234 | /** |
||
235 | * A CreativeWork or Event about this Thing. |
||
236 | * |
||
237 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf |
||
238 | * |
||
239 | * @return static |
||
240 | * |
||
241 | * @see http://schema.org/subjectOf |
||
242 | */ |
||
243 | public function subjectOf($subjectOf) |
||
244 | { |
||
245 | return $this->setProperty('subjectOf', $subjectOf); |
||
246 | } |
||
247 | |||
248 | /** |
||
249 | * URL of the item. |
||
250 | * |
||
251 | * @param string|string[] $url |
||
252 | * |
||
253 | * @return static |
||
254 | * |
||
255 | * @see http://schema.org/url |
||
256 | */ |
||
257 | public function url($url) |
||
258 | { |
||
259 | return $this->setProperty('url', $url); |
||
260 | } |
||
261 | |||
262 | } |
||
263 |
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.