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/CurrencyConversionService.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\CurrencyConversionServiceContract;
6
use \Spatie\SchemaOrg\Contracts\FinancialProductContract;
7
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
8
use \Spatie\SchemaOrg\Contracts\ServiceContract;
9
use \Spatie\SchemaOrg\Contracts\ThingContract;
10
11
/**
12
 * A service to convert funds from one currency to another currency.
13
 *
14
 * @see http://schema.org/CurrencyConversionService
15
 *
16
 */
17 View Code Duplication
class CurrencyConversionService extends BaseType implements CurrencyConversionServiceContract, FinancialProductContract, IntangibleContract, ServiceContract, 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...
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 overall rating, based on a collection of reviews or ratings, of the
40
     * item.
41
     *
42
     * @param \Spatie\SchemaOrg\Contracts\AggregateRatingContract|\Spatie\SchemaOrg\Contracts\AggregateRatingContract[] $aggregateRating
43
     *
44
     * @return static
45
     *
46
     * @see http://schema.org/aggregateRating
47
     */
48
    public function aggregateRating($aggregateRating)
49
    {
50
        return $this->setProperty('aggregateRating', $aggregateRating);
51
    }
52
53
    /**
54
     * An alias for the item.
55
     *
56
     * @param string|string[] $alternateName
57
     *
58
     * @return static
59
     *
60
     * @see http://schema.org/alternateName
61
     */
62
    public function alternateName($alternateName)
63
    {
64
        return $this->setProperty('alternateName', $alternateName);
65
    }
66
67
    /**
68
     * The annual rate that is charged for borrowing (or made by investing),
69
     * expressed as a single percentage number that represents the actual yearly
70
     * cost of funds over the term of a loan. This includes any fees or
71
     * additional costs associated with the transaction.
72
     *
73
     * @param \Spatie\SchemaOrg\Contracts\QuantitativeValueContract|\Spatie\SchemaOrg\Contracts\QuantitativeValueContract[]|float|float[]|int|int[] $annualPercentageRate
74
     *
75
     * @return static
76
     *
77
     * @see http://schema.org/annualPercentageRate
78
     */
79
    public function annualPercentageRate($annualPercentageRate)
80
    {
81
        return $this->setProperty('annualPercentageRate', $annualPercentageRate);
82
    }
83
84
    /**
85
     * The geographic area where a service or offered item is provided.
86
     *
87
     * @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
88
     *
89
     * @return static
90
     *
91
     * @see http://schema.org/areaServed
92
     */
93
    public function areaServed($areaServed)
94
    {
95
        return $this->setProperty('areaServed', $areaServed);
96
    }
97
98
    /**
99
     * An intended audience, i.e. a group for whom something was created.
100
     *
101
     * @param \Spatie\SchemaOrg\Contracts\AudienceContract|\Spatie\SchemaOrg\Contracts\AudienceContract[] $audience
102
     *
103
     * @return static
104
     *
105
     * @see http://schema.org/audience
106
     */
107
    public function audience($audience)
108
    {
109
        return $this->setProperty('audience', $audience);
110
    }
111
112
    /**
113
     * A means of accessing the service (e.g. a phone bank, a web site, a
114
     * location, etc.).
115
     *
116
     * @param \Spatie\SchemaOrg\Contracts\ServiceChannelContract|\Spatie\SchemaOrg\Contracts\ServiceChannelContract[] $availableChannel
117
     *
118
     * @return static
119
     *
120
     * @see http://schema.org/availableChannel
121
     */
122
    public function availableChannel($availableChannel)
123
    {
124
        return $this->setProperty('availableChannel', $availableChannel);
125
    }
126
127
    /**
128
     * An award won by or for this item.
129
     *
130
     * @param string|string[] $award
131
     *
132
     * @return static
133
     *
134
     * @see http://schema.org/award
135
     */
136
    public function award($award)
137
    {
138
        return $this->setProperty('award', $award);
139
    }
140
141
    /**
142
     * The brand(s) associated with a product or service, or the brand(s)
143
     * maintained by an organization or business person.
144
     *
145
     * @param \Spatie\SchemaOrg\Contracts\BrandContract|\Spatie\SchemaOrg\Contracts\BrandContract[]|\Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[] $brand
146
     *
147
     * @return static
148
     *
149
     * @see http://schema.org/brand
150
     */
151
    public function brand($brand)
152
    {
153
        return $this->setProperty('brand', $brand);
154
    }
155
156
    /**
157
     * An entity that arranges for an exchange between a buyer and a seller.  In
158
     * most cases a broker never acquires or releases ownership of a product or
159
     * service involved in an exchange.  If it is not clear whether an entity is
160
     * a broker, seller, or buyer, the latter two terms are preferred.
161
     *
162
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $broker
163
     *
164
     * @return static
165
     *
166
     * @see http://schema.org/broker
167
     */
168
    public function broker($broker)
169
    {
170
        return $this->setProperty('broker', $broker);
171
    }
172
173
    /**
174
     * A category for the item. Greater signs or slashes can be used to
175
     * informally indicate a category hierarchy.
176
     *
177
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[]|string|string[] $category
178
     *
179
     * @return static
180
     *
181
     * @see http://schema.org/category
182
     */
183
    public function category($category)
184
    {
185
        return $this->setProperty('category', $category);
186
    }
187
188
    /**
189
     * A description of the item.
190
     *
191
     * @param string|string[] $description
192
     *
193
     * @return static
194
     *
195
     * @see http://schema.org/description
196
     */
197
    public function description($description)
198
    {
199
        return $this->setProperty('description', $description);
200
    }
201
202
    /**
203
     * A sub property of description. A short description of the item used to
204
     * disambiguate from other, similar items. Information from other properties
205
     * (in particular, name) may be necessary for the description to be useful
206
     * for disambiguation.
207
     *
208
     * @param string|string[] $disambiguatingDescription
209
     *
210
     * @return static
211
     *
212
     * @see http://schema.org/disambiguatingDescription
213
     */
214
    public function disambiguatingDescription($disambiguatingDescription)
215
    {
216
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
217
    }
218
219
    /**
220
     * Description of fees, commissions, and other terms applied either to a
221
     * class of financial product, or by a financial service organization.
222
     *
223
     * @param string|string[] $feesAndCommissionsSpecification
224
     *
225
     * @return static
226
     *
227
     * @see http://schema.org/feesAndCommissionsSpecification
228
     */
229
    public function feesAndCommissionsSpecification($feesAndCommissionsSpecification)
230
    {
231
        return $this->setProperty('feesAndCommissionsSpecification', $feesAndCommissionsSpecification);
232
    }
233
234
    /**
235
     * Indicates an OfferCatalog listing for this Organization, Person, or
236
     * Service.
237
     *
238
     * @param \Spatie\SchemaOrg\Contracts\OfferCatalogContract|\Spatie\SchemaOrg\Contracts\OfferCatalogContract[] $hasOfferCatalog
239
     *
240
     * @return static
241
     *
242
     * @see http://schema.org/hasOfferCatalog
243
     */
244
    public function hasOfferCatalog($hasOfferCatalog)
245
    {
246
        return $this->setProperty('hasOfferCatalog', $hasOfferCatalog);
247
    }
248
249
    /**
250
     * The hours during which this service or contact is available.
251
     *
252
     * @param \Spatie\SchemaOrg\Contracts\OpeningHoursSpecificationContract|\Spatie\SchemaOrg\Contracts\OpeningHoursSpecificationContract[] $hoursAvailable
253
     *
254
     * @return static
255
     *
256
     * @see http://schema.org/hoursAvailable
257
     */
258
    public function hoursAvailable($hoursAvailable)
259
    {
260
        return $this->setProperty('hoursAvailable', $hoursAvailable);
261
    }
262
263
    /**
264
     * The identifier property represents any kind of identifier for any kind of
265
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
266
     * dedicated properties for representing many of these, either as textual
267
     * strings or as URL (URI) links. See [background
268
     * notes](/docs/datamodel.html#identifierBg) for more details.
269
     *
270
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
271
     *
272
     * @return static
273
     *
274
     * @see http://schema.org/identifier
275
     */
276
    public function identifier($identifier)
277
    {
278
        return $this->setProperty('identifier', $identifier);
279
    }
280
281
    /**
282
     * An image of the item. This can be a [[URL]] or a fully described
283
     * [[ImageObject]].
284
     *
285
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
286
     *
287
     * @return static
288
     *
289
     * @see http://schema.org/image
290
     */
291
    public function image($image)
292
    {
293
        return $this->setProperty('image', $image);
294
    }
295
296
    /**
297
     * The interest rate, charged or paid, applicable to the financial product.
298
     * Note: This is different from the calculated annualPercentageRate.
299
     *
300
     * @param \Spatie\SchemaOrg\Contracts\QuantitativeValueContract|\Spatie\SchemaOrg\Contracts\QuantitativeValueContract[]|float|float[]|int|int[] $interestRate
301
     *
302
     * @return static
303
     *
304
     * @see http://schema.org/interestRate
305
     */
306
    public function interestRate($interestRate)
307
    {
308
        return $this->setProperty('interestRate', $interestRate);
309
    }
310
311
    /**
312
     * A pointer to another, somehow related product (or multiple products).
313
     *
314
     * @param \Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|\Spatie\SchemaOrg\Contracts\ServiceContract|\Spatie\SchemaOrg\Contracts\ServiceContract[] $isRelatedTo
315
     *
316
     * @return static
317
     *
318
     * @see http://schema.org/isRelatedTo
319
     */
320
    public function isRelatedTo($isRelatedTo)
321
    {
322
        return $this->setProperty('isRelatedTo', $isRelatedTo);
323
    }
324
325
    /**
326
     * A pointer to another, functionally similar product (or multiple
327
     * products).
328
     *
329
     * @param \Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|\Spatie\SchemaOrg\Contracts\ServiceContract|\Spatie\SchemaOrg\Contracts\ServiceContract[] $isSimilarTo
330
     *
331
     * @return static
332
     *
333
     * @see http://schema.org/isSimilarTo
334
     */
335
    public function isSimilarTo($isSimilarTo)
336
    {
337
        return $this->setProperty('isSimilarTo', $isSimilarTo);
338
    }
339
340
    /**
341
     * An associated logo.
342
     *
343
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $logo
344
     *
345
     * @return static
346
     *
347
     * @see http://schema.org/logo
348
     */
349
    public function logo($logo)
350
    {
351
        return $this->setProperty('logo', $logo);
352
    }
353
354
    /**
355
     * Indicates a page (or other CreativeWork) for which this thing is the main
356
     * entity being described. See [background
357
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
358
     *
359
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
360
     *
361
     * @return static
362
     *
363
     * @see http://schema.org/mainEntityOfPage
364
     */
365
    public function mainEntityOfPage($mainEntityOfPage)
366
    {
367
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
368
    }
369
370
    /**
371
     * The name of the item.
372
     *
373
     * @param string|string[] $name
374
     *
375
     * @return static
376
     *
377
     * @see http://schema.org/name
378
     */
379
    public function name($name)
380
    {
381
        return $this->setProperty('name', $name);
382
    }
383
384
    /**
385
     * An offer to provide this item&#x2014;for example, an offer to sell a
386
     * product, rent the DVD of a movie, perform a service, or give away tickets
387
     * to an event. Use [[businessFunction]] to indicate the kind of transaction
388
     * offered, i.e. sell, lease, etc. This property can also be used to
389
     * describe a [[Demand]]. While this property is listed as expected on a
390
     * number of common types, it can be used in others. In that case, using a
391
     * second type, such as Product or a subtype of Product, can clarify the
392
     * nature of the offer.
393
     *
394
     * @param \Spatie\SchemaOrg\Contracts\DemandContract|\Spatie\SchemaOrg\Contracts\DemandContract[]|\Spatie\SchemaOrg\Contracts\OfferContract|\Spatie\SchemaOrg\Contracts\OfferContract[] $offers
395
     *
396
     * @return static
397
     *
398
     * @see http://schema.org/offers
399
     */
400
    public function offers($offers)
401
    {
402
        return $this->setProperty('offers', $offers);
403
    }
404
405
    /**
406
     * Indicates a potential Action, which describes an idealized action in
407
     * which this thing would play an 'object' role.
408
     *
409
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
410
     *
411
     * @return static
412
     *
413
     * @see http://schema.org/potentialAction
414
     */
415
    public function potentialAction($potentialAction)
416
    {
417
        return $this->setProperty('potentialAction', $potentialAction);
418
    }
419
420
    /**
421
     * The tangible thing generated by the service, e.g. a passport, permit,
422
     * etc.
423
     *
424
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $produces
425
     *
426
     * @return static
427
     *
428
     * @see http://schema.org/produces
429
     */
430
    public function produces($produces)
431
    {
432
        return $this->setProperty('produces', $produces);
433
    }
434
435
    /**
436
     * The service provider, service operator, or service performer; the goods
437
     * producer. Another party (a seller) may offer those services or goods on
438
     * behalf of the provider. A provider may also serve as the seller.
439
     *
440
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $provider
441
     *
442
     * @return static
443
     *
444
     * @see http://schema.org/provider
445
     */
446
    public function provider($provider)
447
    {
448
        return $this->setProperty('provider', $provider);
449
    }
450
451
    /**
452
     * Indicates the mobility of a provided service (e.g. 'static', 'dynamic').
453
     *
454
     * @param string|string[] $providerMobility
455
     *
456
     * @return static
457
     *
458
     * @see http://schema.org/providerMobility
459
     */
460
    public function providerMobility($providerMobility)
461
    {
462
        return $this->setProperty('providerMobility', $providerMobility);
463
    }
464
465
    /**
466
     * A review of the item.
467
     *
468
     * @param \Spatie\SchemaOrg\Contracts\ReviewContract|\Spatie\SchemaOrg\Contracts\ReviewContract[] $review
469
     *
470
     * @return static
471
     *
472
     * @see http://schema.org/review
473
     */
474
    public function review($review)
475
    {
476
        return $this->setProperty('review', $review);
477
    }
478
479
    /**
480
     * URL of a reference Web page that unambiguously indicates the item's
481
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
482
     * official website.
483
     *
484
     * @param string|string[] $sameAs
485
     *
486
     * @return static
487
     *
488
     * @see http://schema.org/sameAs
489
     */
490
    public function sameAs($sameAs)
491
    {
492
        return $this->setProperty('sameAs', $sameAs);
493
    }
494
495
    /**
496
     * The geographic area where the service is provided.
497
     *
498
     * @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
499
     *
500
     * @return static
501
     *
502
     * @see http://schema.org/serviceArea
503
     */
504
    public function serviceArea($serviceArea)
505
    {
506
        return $this->setProperty('serviceArea', $serviceArea);
507
    }
508
509
    /**
510
     * The audience eligible for this service.
511
     *
512
     * @param \Spatie\SchemaOrg\Contracts\AudienceContract|\Spatie\SchemaOrg\Contracts\AudienceContract[] $serviceAudience
513
     *
514
     * @return static
515
     *
516
     * @see http://schema.org/serviceAudience
517
     */
518
    public function serviceAudience($serviceAudience)
519
    {
520
        return $this->setProperty('serviceAudience', $serviceAudience);
521
    }
522
523
    /**
524
     * The tangible thing generated by the service, e.g. a passport, permit,
525
     * etc.
526
     *
527
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $serviceOutput
528
     *
529
     * @return static
530
     *
531
     * @see http://schema.org/serviceOutput
532
     */
533
    public function serviceOutput($serviceOutput)
534
    {
535
        return $this->setProperty('serviceOutput', $serviceOutput);
536
    }
537
538
    /**
539
     * The type of service being offered, e.g. veterans' benefits, emergency
540
     * relief, etc.
541
     *
542
     * @param string|string[] $serviceType
543
     *
544
     * @return static
545
     *
546
     * @see http://schema.org/serviceType
547
     */
548
    public function serviceType($serviceType)
549
    {
550
        return $this->setProperty('serviceType', $serviceType);
551
    }
552
553
    /**
554
     * A slogan or motto associated with the item.
555
     *
556
     * @param string|string[] $slogan
557
     *
558
     * @return static
559
     *
560
     * @see http://schema.org/slogan
561
     */
562
    public function slogan($slogan)
563
    {
564
        return $this->setProperty('slogan', $slogan);
565
    }
566
567
    /**
568
     * A CreativeWork or Event about this Thing.
569
     *
570
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
571
     *
572
     * @return static
573
     *
574
     * @see http://schema.org/subjectOf
575
     */
576
    public function subjectOf($subjectOf)
577
    {
578
        return $this->setProperty('subjectOf', $subjectOf);
579
    }
580
581
    /**
582
     * URL of the item.
583
     *
584
     * @param string|string[] $url
585
     *
586
     * @return static
587
     *
588
     * @see http://schema.org/url
589
     */
590
    public function url($url)
591
    {
592
        return $this->setProperty('url', $url);
593
    }
594
595
}
596