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\NutritionInformationContract; |
||
6 | use \Spatie\SchemaOrg\Contracts\IntangibleContract; |
||
7 | use \Spatie\SchemaOrg\Contracts\StructuredValueContract; |
||
8 | use \Spatie\SchemaOrg\Contracts\ThingContract; |
||
9 | |||
10 | /** |
||
11 | * Nutritional information about the recipe. |
||
12 | * |
||
13 | * @see http://schema.org/NutritionInformation |
||
14 | * |
||
15 | */ |
||
16 | View Code Duplication | class NutritionInformation extends BaseType implements NutritionInformationContract, IntangibleContract, StructuredValueContract, ThingContract |
|
0 ignored issues
–
show
|
|||
17 | { |
||
18 | /** |
||
19 | * An additional type for the item, typically used for adding more specific |
||
20 | * types from external vocabularies in microdata syntax. This is a |
||
21 | * relationship between something and a class that the thing is in. In RDFa |
||
22 | * syntax, it is better to use the native RDFa syntax - the 'typeof' |
||
23 | * attribute - for multiple types. Schema.org tools may have only weaker |
||
24 | * understanding of extra types, in particular those defined externally. |
||
25 | * |
||
26 | * @param string|string[] $additionalType |
||
27 | * |
||
28 | * @return static |
||
29 | * |
||
30 | * @see http://schema.org/additionalType |
||
31 | */ |
||
32 | public function additionalType($additionalType) |
||
33 | { |
||
34 | return $this->setProperty('additionalType', $additionalType); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * An alias for the item. |
||
39 | * |
||
40 | * @param string|string[] $alternateName |
||
41 | * |
||
42 | * @return static |
||
43 | * |
||
44 | * @see http://schema.org/alternateName |
||
45 | */ |
||
46 | public function alternateName($alternateName) |
||
47 | { |
||
48 | return $this->setProperty('alternateName', $alternateName); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * The number of calories. |
||
53 | * |
||
54 | * @param \Spatie\SchemaOrg\Contracts\EnergyContract|\Spatie\SchemaOrg\Contracts\EnergyContract[] $calories |
||
55 | * |
||
56 | * @return static |
||
57 | * |
||
58 | * @see http://schema.org/calories |
||
59 | */ |
||
60 | public function calories($calories) |
||
61 | { |
||
62 | return $this->setProperty('calories', $calories); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * The number of grams of carbohydrates. |
||
67 | * |
||
68 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $carbohydrateContent |
||
69 | * |
||
70 | * @return static |
||
71 | * |
||
72 | * @see http://schema.org/carbohydrateContent |
||
73 | */ |
||
74 | public function carbohydrateContent($carbohydrateContent) |
||
75 | { |
||
76 | return $this->setProperty('carbohydrateContent', $carbohydrateContent); |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * The number of milligrams of cholesterol. |
||
81 | * |
||
82 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $cholesterolContent |
||
83 | * |
||
84 | * @return static |
||
85 | * |
||
86 | * @see http://schema.org/cholesterolContent |
||
87 | */ |
||
88 | public function cholesterolContent($cholesterolContent) |
||
89 | { |
||
90 | return $this->setProperty('cholesterolContent', $cholesterolContent); |
||
91 | } |
||
92 | |||
93 | /** |
||
94 | * A description of the item. |
||
95 | * |
||
96 | * @param string|string[] $description |
||
97 | * |
||
98 | * @return static |
||
99 | * |
||
100 | * @see http://schema.org/description |
||
101 | */ |
||
102 | public function description($description) |
||
103 | { |
||
104 | return $this->setProperty('description', $description); |
||
105 | } |
||
106 | |||
107 | /** |
||
108 | * A sub property of description. A short description of the item used to |
||
109 | * disambiguate from other, similar items. Information from other properties |
||
110 | * (in particular, name) may be necessary for the description to be useful |
||
111 | * for disambiguation. |
||
112 | * |
||
113 | * @param string|string[] $disambiguatingDescription |
||
114 | * |
||
115 | * @return static |
||
116 | * |
||
117 | * @see http://schema.org/disambiguatingDescription |
||
118 | */ |
||
119 | public function disambiguatingDescription($disambiguatingDescription) |
||
120 | { |
||
121 | return $this->setProperty('disambiguatingDescription', $disambiguatingDescription); |
||
122 | } |
||
123 | |||
124 | /** |
||
125 | * The number of grams of fat. |
||
126 | * |
||
127 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $fatContent |
||
128 | * |
||
129 | * @return static |
||
130 | * |
||
131 | * @see http://schema.org/fatContent |
||
132 | */ |
||
133 | public function fatContent($fatContent) |
||
134 | { |
||
135 | return $this->setProperty('fatContent', $fatContent); |
||
136 | } |
||
137 | |||
138 | /** |
||
139 | * The number of grams of fiber. |
||
140 | * |
||
141 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $fiberContent |
||
142 | * |
||
143 | * @return static |
||
144 | * |
||
145 | * @see http://schema.org/fiberContent |
||
146 | */ |
||
147 | public function fiberContent($fiberContent) |
||
148 | { |
||
149 | return $this->setProperty('fiberContent', $fiberContent); |
||
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 | * Indicates a page (or other CreativeWork) for which this thing is the main |
||
187 | * entity being described. See [background |
||
188 | * notes](/docs/datamodel.html#mainEntityBackground) for details. |
||
189 | * |
||
190 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage |
||
191 | * |
||
192 | * @return static |
||
193 | * |
||
194 | * @see http://schema.org/mainEntityOfPage |
||
195 | */ |
||
196 | public function mainEntityOfPage($mainEntityOfPage) |
||
197 | { |
||
198 | return $this->setProperty('mainEntityOfPage', $mainEntityOfPage); |
||
199 | } |
||
200 | |||
201 | /** |
||
202 | * The name of the item. |
||
203 | * |
||
204 | * @param string|string[] $name |
||
205 | * |
||
206 | * @return static |
||
207 | * |
||
208 | * @see http://schema.org/name |
||
209 | */ |
||
210 | public function name($name) |
||
211 | { |
||
212 | return $this->setProperty('name', $name); |
||
213 | } |
||
214 | |||
215 | /** |
||
216 | * Indicates a potential Action, which describes an idealized action in |
||
217 | * which this thing would play an 'object' role. |
||
218 | * |
||
219 | * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction |
||
220 | * |
||
221 | * @return static |
||
222 | * |
||
223 | * @see http://schema.org/potentialAction |
||
224 | */ |
||
225 | public function potentialAction($potentialAction) |
||
226 | { |
||
227 | return $this->setProperty('potentialAction', $potentialAction); |
||
228 | } |
||
229 | |||
230 | /** |
||
231 | * The number of grams of protein. |
||
232 | * |
||
233 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $proteinContent |
||
234 | * |
||
235 | * @return static |
||
236 | * |
||
237 | * @see http://schema.org/proteinContent |
||
238 | */ |
||
239 | public function proteinContent($proteinContent) |
||
240 | { |
||
241 | return $this->setProperty('proteinContent', $proteinContent); |
||
242 | } |
||
243 | |||
244 | /** |
||
245 | * URL of a reference Web page that unambiguously indicates the item's |
||
246 | * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or |
||
247 | * official website. |
||
248 | * |
||
249 | * @param string|string[] $sameAs |
||
250 | * |
||
251 | * @return static |
||
252 | * |
||
253 | * @see http://schema.org/sameAs |
||
254 | */ |
||
255 | public function sameAs($sameAs) |
||
256 | { |
||
257 | return $this->setProperty('sameAs', $sameAs); |
||
258 | } |
||
259 | |||
260 | /** |
||
261 | * The number of grams of saturated fat. |
||
262 | * |
||
263 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $saturatedFatContent |
||
264 | * |
||
265 | * @return static |
||
266 | * |
||
267 | * @see http://schema.org/saturatedFatContent |
||
268 | */ |
||
269 | public function saturatedFatContent($saturatedFatContent) |
||
270 | { |
||
271 | return $this->setProperty('saturatedFatContent', $saturatedFatContent); |
||
272 | } |
||
273 | |||
274 | /** |
||
275 | * The serving size, in terms of the number of volume or mass. |
||
276 | * |
||
277 | * @param string|string[] $servingSize |
||
278 | * |
||
279 | * @return static |
||
280 | * |
||
281 | * @see http://schema.org/servingSize |
||
282 | */ |
||
283 | public function servingSize($servingSize) |
||
284 | { |
||
285 | return $this->setProperty('servingSize', $servingSize); |
||
286 | } |
||
287 | |||
288 | /** |
||
289 | * The number of milligrams of sodium. |
||
290 | * |
||
291 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $sodiumContent |
||
292 | * |
||
293 | * @return static |
||
294 | * |
||
295 | * @see http://schema.org/sodiumContent |
||
296 | */ |
||
297 | public function sodiumContent($sodiumContent) |
||
298 | { |
||
299 | return $this->setProperty('sodiumContent', $sodiumContent); |
||
300 | } |
||
301 | |||
302 | /** |
||
303 | * A CreativeWork or Event about this Thing. |
||
304 | * |
||
305 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf |
||
306 | * |
||
307 | * @return static |
||
308 | * |
||
309 | * @see http://schema.org/subjectOf |
||
310 | */ |
||
311 | public function subjectOf($subjectOf) |
||
312 | { |
||
313 | return $this->setProperty('subjectOf', $subjectOf); |
||
314 | } |
||
315 | |||
316 | /** |
||
317 | * The number of grams of sugar. |
||
318 | * |
||
319 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $sugarContent |
||
320 | * |
||
321 | * @return static |
||
322 | * |
||
323 | * @see http://schema.org/sugarContent |
||
324 | */ |
||
325 | public function sugarContent($sugarContent) |
||
326 | { |
||
327 | return $this->setProperty('sugarContent', $sugarContent); |
||
328 | } |
||
329 | |||
330 | /** |
||
331 | * The number of grams of trans fat. |
||
332 | * |
||
333 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $transFatContent |
||
334 | * |
||
335 | * @return static |
||
336 | * |
||
337 | * @see http://schema.org/transFatContent |
||
338 | */ |
||
339 | public function transFatContent($transFatContent) |
||
340 | { |
||
341 | return $this->setProperty('transFatContent', $transFatContent); |
||
342 | } |
||
343 | |||
344 | /** |
||
345 | * The number of grams of unsaturated fat. |
||
346 | * |
||
347 | * @param \Spatie\SchemaOrg\Contracts\MassContract|\Spatie\SchemaOrg\Contracts\MassContract[] $unsaturatedFatContent |
||
348 | * |
||
349 | * @return static |
||
350 | * |
||
351 | * @see http://schema.org/unsaturatedFatContent |
||
352 | */ |
||
353 | public function unsaturatedFatContent($unsaturatedFatContent) |
||
354 | { |
||
355 | return $this->setProperty('unsaturatedFatContent', $unsaturatedFatContent); |
||
356 | } |
||
357 | |||
358 | /** |
||
359 | * URL of the item. |
||
360 | * |
||
361 | * @param string|string[] $url |
||
362 | * |
||
363 | * @return static |
||
364 | * |
||
365 | * @see http://schema.org/url |
||
366 | */ |
||
367 | public function url($url) |
||
368 | { |
||
369 | return $this->setProperty('url', $url); |
||
370 | } |
||
371 | |||
372 | } |
||
373 |
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.