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\PostalAddressContract; |
||
6 | use \Spatie\SchemaOrg\Contracts\ContactPointContract; |
||
7 | use \Spatie\SchemaOrg\Contracts\IntangibleContract; |
||
8 | use \Spatie\SchemaOrg\Contracts\StructuredValueContract; |
||
9 | use \Spatie\SchemaOrg\Contracts\ThingContract; |
||
10 | |||
11 | /** |
||
12 | * The mailing address. |
||
13 | * |
||
14 | * @see http://schema.org/PostalAddress |
||
15 | * |
||
16 | */ |
||
17 | View Code Duplication | class PostalAddress extends BaseType implements PostalAddressContract, ContactPointContract, IntangibleContract, StructuredValueContract, ThingContract |
|
0 ignored issues
–
show
|
|||
18 | { |
||
19 | /** |
||
20 | * An additional type for the item, typically used for adding more specific |
||
21 | * types from external vocabularies in microdata syntax. This is a |
||
22 | * relationship between something and a class that the thing is in. In RDFa |
||
23 | * syntax, it is better to use the native RDFa syntax - the 'typeof' |
||
24 | * attribute - for multiple types. Schema.org tools may have only weaker |
||
25 | * understanding of extra types, in particular those defined externally. |
||
26 | * |
||
27 | * @param string|string[] $additionalType |
||
28 | * |
||
29 | * @return static |
||
30 | * |
||
31 | * @see http://schema.org/additionalType |
||
32 | */ |
||
33 | public function additionalType($additionalType) |
||
34 | { |
||
35 | return $this->setProperty('additionalType', $additionalType); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * The country. For example, USA. You can also provide the two-letter [ISO |
||
40 | * 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1). |
||
41 | * |
||
42 | * @param \Spatie\SchemaOrg\Contracts\CountryContract|\Spatie\SchemaOrg\Contracts\CountryContract[]|string|string[] $addressCountry |
||
43 | * |
||
44 | * @return static |
||
45 | * |
||
46 | * @see http://schema.org/addressCountry |
||
47 | */ |
||
48 | public function addressCountry($addressCountry) |
||
49 | { |
||
50 | return $this->setProperty('addressCountry', $addressCountry); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * The locality in which the street address is, and which is in the region. |
||
55 | * For example, Mountain View. |
||
56 | * |
||
57 | * @param string|string[] $addressLocality |
||
58 | * |
||
59 | * @return static |
||
60 | * |
||
61 | * @see http://schema.org/addressLocality |
||
62 | */ |
||
63 | public function addressLocality($addressLocality) |
||
64 | { |
||
65 | return $this->setProperty('addressLocality', $addressLocality); |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * The region in which the locality is, and which is in the country. For |
||
70 | * example, California or another appropriate first-level [Administrative |
||
71 | * division](https://en.wikipedia.org/wiki/List_of_administrative_divisions_by_country) |
||
72 | * |
||
73 | * @param string|string[] $addressRegion |
||
74 | * |
||
75 | * @return static |
||
76 | * |
||
77 | * @see http://schema.org/addressRegion |
||
78 | */ |
||
79 | public function addressRegion($addressRegion) |
||
80 | { |
||
81 | return $this->setProperty('addressRegion', $addressRegion); |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * An alias for the item. |
||
86 | * |
||
87 | * @param string|string[] $alternateName |
||
88 | * |
||
89 | * @return static |
||
90 | * |
||
91 | * @see http://schema.org/alternateName |
||
92 | */ |
||
93 | public function alternateName($alternateName) |
||
94 | { |
||
95 | return $this->setProperty('alternateName', $alternateName); |
||
96 | } |
||
97 | |||
98 | /** |
||
99 | * The geographic area where a service or offered item is provided. |
||
100 | * |
||
101 | * @param \Spatie\SchemaOrg\Contracts\AdministrativeAreaContract|\Spatie\SchemaOrg\Contracts\AdministrativeAreaContract[]|\Spatie\SchemaOrg\Contracts\GeoShapeContract|\Spatie\SchemaOrg\Contracts\GeoShapeContract[]|\Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[]|string|string[] $areaServed |
||
102 | * |
||
103 | * @return static |
||
104 | * |
||
105 | * @see http://schema.org/areaServed |
||
106 | */ |
||
107 | public function areaServed($areaServed) |
||
108 | { |
||
109 | return $this->setProperty('areaServed', $areaServed); |
||
110 | } |
||
111 | |||
112 | /** |
||
113 | * A language someone may use with or at the item, service or place. Please |
||
114 | * use one of the language codes from the [IETF BCP 47 |
||
115 | * standard](http://tools.ietf.org/html/bcp47). See also [[inLanguage]] |
||
116 | * |
||
117 | * @param \Spatie\SchemaOrg\Contracts\LanguageContract|\Spatie\SchemaOrg\Contracts\LanguageContract[]|string|string[] $availableLanguage |
||
118 | * |
||
119 | * @return static |
||
120 | * |
||
121 | * @see http://schema.org/availableLanguage |
||
122 | */ |
||
123 | public function availableLanguage($availableLanguage) |
||
124 | { |
||
125 | return $this->setProperty('availableLanguage', $availableLanguage); |
||
126 | } |
||
127 | |||
128 | /** |
||
129 | * An option available on this contact point (e.g. a toll-free number or |
||
130 | * support for hearing-impaired callers). |
||
131 | * |
||
132 | * @param \Spatie\SchemaOrg\Contracts\ContactPointOptionContract|\Spatie\SchemaOrg\Contracts\ContactPointOptionContract[] $contactOption |
||
133 | * |
||
134 | * @return static |
||
135 | * |
||
136 | * @see http://schema.org/contactOption |
||
137 | */ |
||
138 | public function contactOption($contactOption) |
||
139 | { |
||
140 | return $this->setProperty('contactOption', $contactOption); |
||
141 | } |
||
142 | |||
143 | /** |
||
144 | * A person or organization can have different contact points, for different |
||
145 | * purposes. For example, a sales contact point, a PR contact point and so |
||
146 | * on. This property is used to specify the kind of contact point. |
||
147 | * |
||
148 | * @param string|string[] $contactType |
||
149 | * |
||
150 | * @return static |
||
151 | * |
||
152 | * @see http://schema.org/contactType |
||
153 | */ |
||
154 | public function contactType($contactType) |
||
155 | { |
||
156 | return $this->setProperty('contactType', $contactType); |
||
157 | } |
||
158 | |||
159 | /** |
||
160 | * A description of the item. |
||
161 | * |
||
162 | * @param string|string[] $description |
||
163 | * |
||
164 | * @return static |
||
165 | * |
||
166 | * @see http://schema.org/description |
||
167 | */ |
||
168 | public function description($description) |
||
169 | { |
||
170 | return $this->setProperty('description', $description); |
||
171 | } |
||
172 | |||
173 | /** |
||
174 | * A sub property of description. A short description of the item used to |
||
175 | * disambiguate from other, similar items. Information from other properties |
||
176 | * (in particular, name) may be necessary for the description to be useful |
||
177 | * for disambiguation. |
||
178 | * |
||
179 | * @param string|string[] $disambiguatingDescription |
||
180 | * |
||
181 | * @return static |
||
182 | * |
||
183 | * @see http://schema.org/disambiguatingDescription |
||
184 | */ |
||
185 | public function disambiguatingDescription($disambiguatingDescription) |
||
186 | { |
||
187 | return $this->setProperty('disambiguatingDescription', $disambiguatingDescription); |
||
188 | } |
||
189 | |||
190 | /** |
||
191 | * Email address. |
||
192 | * |
||
193 | * @param string|string[] $email |
||
194 | * |
||
195 | * @return static |
||
196 | * |
||
197 | * @see http://schema.org/email |
||
198 | */ |
||
199 | public function email($email) |
||
200 | { |
||
201 | return $this->setProperty('email', $email); |
||
202 | } |
||
203 | |||
204 | /** |
||
205 | * The fax number. |
||
206 | * |
||
207 | * @param string|string[] $faxNumber |
||
208 | * |
||
209 | * @return static |
||
210 | * |
||
211 | * @see http://schema.org/faxNumber |
||
212 | */ |
||
213 | public function faxNumber($faxNumber) |
||
214 | { |
||
215 | return $this->setProperty('faxNumber', $faxNumber); |
||
216 | } |
||
217 | |||
218 | /** |
||
219 | * The hours during which this service or contact is available. |
||
220 | * |
||
221 | * @param \Spatie\SchemaOrg\Contracts\OpeningHoursSpecificationContract|\Spatie\SchemaOrg\Contracts\OpeningHoursSpecificationContract[] $hoursAvailable |
||
222 | * |
||
223 | * @return static |
||
224 | * |
||
225 | * @see http://schema.org/hoursAvailable |
||
226 | */ |
||
227 | public function hoursAvailable($hoursAvailable) |
||
228 | { |
||
229 | return $this->setProperty('hoursAvailable', $hoursAvailable); |
||
230 | } |
||
231 | |||
232 | /** |
||
233 | * The identifier property represents any kind of identifier for any kind of |
||
234 | * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides |
||
235 | * dedicated properties for representing many of these, either as textual |
||
236 | * strings or as URL (URI) links. See [background |
||
237 | * notes](/docs/datamodel.html#identifierBg) for more details. |
||
238 | * |
||
239 | * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier |
||
240 | * |
||
241 | * @return static |
||
242 | * |
||
243 | * @see http://schema.org/identifier |
||
244 | */ |
||
245 | public function identifier($identifier) |
||
246 | { |
||
247 | return $this->setProperty('identifier', $identifier); |
||
248 | } |
||
249 | |||
250 | /** |
||
251 | * An image of the item. This can be a [[URL]] or a fully described |
||
252 | * [[ImageObject]]. |
||
253 | * |
||
254 | * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image |
||
255 | * |
||
256 | * @return static |
||
257 | * |
||
258 | * @see http://schema.org/image |
||
259 | */ |
||
260 | public function image($image) |
||
261 | { |
||
262 | return $this->setProperty('image', $image); |
||
263 | } |
||
264 | |||
265 | /** |
||
266 | * Indicates a page (or other CreativeWork) for which this thing is the main |
||
267 | * entity being described. See [background |
||
268 | * notes](/docs/datamodel.html#mainEntityBackground) for details. |
||
269 | * |
||
270 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage |
||
271 | * |
||
272 | * @return static |
||
273 | * |
||
274 | * @see http://schema.org/mainEntityOfPage |
||
275 | */ |
||
276 | public function mainEntityOfPage($mainEntityOfPage) |
||
277 | { |
||
278 | return $this->setProperty('mainEntityOfPage', $mainEntityOfPage); |
||
279 | } |
||
280 | |||
281 | /** |
||
282 | * The name of the item. |
||
283 | * |
||
284 | * @param string|string[] $name |
||
285 | * |
||
286 | * @return static |
||
287 | * |
||
288 | * @see http://schema.org/name |
||
289 | */ |
||
290 | public function name($name) |
||
291 | { |
||
292 | return $this->setProperty('name', $name); |
||
293 | } |
||
294 | |||
295 | /** |
||
296 | * The post office box number for PO box addresses. |
||
297 | * |
||
298 | * @param string|string[] $postOfficeBoxNumber |
||
299 | * |
||
300 | * @return static |
||
301 | * |
||
302 | * @see http://schema.org/postOfficeBoxNumber |
||
303 | */ |
||
304 | public function postOfficeBoxNumber($postOfficeBoxNumber) |
||
305 | { |
||
306 | return $this->setProperty('postOfficeBoxNumber', $postOfficeBoxNumber); |
||
307 | } |
||
308 | |||
309 | /** |
||
310 | * The postal code. For example, 94043. |
||
311 | * |
||
312 | * @param string|string[] $postalCode |
||
313 | * |
||
314 | * @return static |
||
315 | * |
||
316 | * @see http://schema.org/postalCode |
||
317 | */ |
||
318 | public function postalCode($postalCode) |
||
319 | { |
||
320 | return $this->setProperty('postalCode', $postalCode); |
||
321 | } |
||
322 | |||
323 | /** |
||
324 | * Indicates a potential Action, which describes an idealized action in |
||
325 | * which this thing would play an 'object' role. |
||
326 | * |
||
327 | * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction |
||
328 | * |
||
329 | * @return static |
||
330 | * |
||
331 | * @see http://schema.org/potentialAction |
||
332 | */ |
||
333 | public function potentialAction($potentialAction) |
||
334 | { |
||
335 | return $this->setProperty('potentialAction', $potentialAction); |
||
336 | } |
||
337 | |||
338 | /** |
||
339 | * The product or service this support contact point is related to (such as |
||
340 | * product support for a particular product line). This can be a specific |
||
341 | * product or product line (e.g. "iPhone") or a general category of products |
||
342 | * or services (e.g. "smartphones"). |
||
343 | * |
||
344 | * @param \Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|string|string[] $productSupported |
||
345 | * |
||
346 | * @return static |
||
347 | * |
||
348 | * @see http://schema.org/productSupported |
||
349 | */ |
||
350 | public function productSupported($productSupported) |
||
351 | { |
||
352 | return $this->setProperty('productSupported', $productSupported); |
||
353 | } |
||
354 | |||
355 | /** |
||
356 | * URL of a reference Web page that unambiguously indicates the item's |
||
357 | * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or |
||
358 | * official website. |
||
359 | * |
||
360 | * @param string|string[] $sameAs |
||
361 | * |
||
362 | * @return static |
||
363 | * |
||
364 | * @see http://schema.org/sameAs |
||
365 | */ |
||
366 | public function sameAs($sameAs) |
||
367 | { |
||
368 | return $this->setProperty('sameAs', $sameAs); |
||
369 | } |
||
370 | |||
371 | /** |
||
372 | * The geographic area where the service is provided. |
||
373 | * |
||
374 | * @param \Spatie\SchemaOrg\Contracts\AdministrativeAreaContract|\Spatie\SchemaOrg\Contracts\AdministrativeAreaContract[]|\Spatie\SchemaOrg\Contracts\GeoShapeContract|\Spatie\SchemaOrg\Contracts\GeoShapeContract[]|\Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $serviceArea |
||
375 | * |
||
376 | * @return static |
||
377 | * |
||
378 | * @see http://schema.org/serviceArea |
||
379 | */ |
||
380 | public function serviceArea($serviceArea) |
||
381 | { |
||
382 | return $this->setProperty('serviceArea', $serviceArea); |
||
383 | } |
||
384 | |||
385 | /** |
||
386 | * The street address. For example, 1600 Amphitheatre Pkwy. |
||
387 | * |
||
388 | * @param string|string[] $streetAddress |
||
389 | * |
||
390 | * @return static |
||
391 | * |
||
392 | * @see http://schema.org/streetAddress |
||
393 | */ |
||
394 | public function streetAddress($streetAddress) |
||
395 | { |
||
396 | return $this->setProperty('streetAddress', $streetAddress); |
||
397 | } |
||
398 | |||
399 | /** |
||
400 | * A CreativeWork or Event about this Thing. |
||
401 | * |
||
402 | * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf |
||
403 | * |
||
404 | * @return static |
||
405 | * |
||
406 | * @see http://schema.org/subjectOf |
||
407 | */ |
||
408 | public function subjectOf($subjectOf) |
||
409 | { |
||
410 | return $this->setProperty('subjectOf', $subjectOf); |
||
411 | } |
||
412 | |||
413 | /** |
||
414 | * The telephone number. |
||
415 | * |
||
416 | * @param string|string[] $telephone |
||
417 | * |
||
418 | * @return static |
||
419 | * |
||
420 | * @see http://schema.org/telephone |
||
421 | */ |
||
422 | public function telephone($telephone) |
||
423 | { |
||
424 | return $this->setProperty('telephone', $telephone); |
||
425 | } |
||
426 | |||
427 | /** |
||
428 | * URL of the item. |
||
429 | * |
||
430 | * @param string|string[] $url |
||
431 | * |
||
432 | * @return static |
||
433 | * |
||
434 | * @see http://schema.org/url |
||
435 | */ |
||
436 | public function url($url) |
||
437 | { |
||
438 | return $this->setProperty('url', $url); |
||
439 | } |
||
440 | |||
441 | } |
||
442 |
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.