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/Invoice.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\InvoiceContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
9
/**
10
 * A statement of the money due for goods or services; a bill.
11
 *
12
 * @see http://schema.org/Invoice
13
 *
14
 */
15 View Code Duplication
class Invoice extends BaseType implements InvoiceContract, IntangibleContract, 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...
16
{
17
    /**
18
     * The identifier for the account the payment will be applied to.
19
     *
20
     * @param string|string[] $accountId
21
     *
22
     * @return static
23
     *
24
     * @see http://schema.org/accountId
25
     */
26
    public function accountId($accountId)
27
    {
28
        return $this->setProperty('accountId', $accountId);
29
    }
30
31
    /**
32
     * An additional type for the item, typically used for adding more specific
33
     * types from external vocabularies in microdata syntax. This is a
34
     * relationship between something and a class that the thing is in. In RDFa
35
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
36
     * attribute - for multiple types. Schema.org tools may have only weaker
37
     * understanding of extra types, in particular those defined externally.
38
     *
39
     * @param string|string[] $additionalType
40
     *
41
     * @return static
42
     *
43
     * @see http://schema.org/additionalType
44
     */
45
    public function additionalType($additionalType)
46
    {
47
        return $this->setProperty('additionalType', $additionalType);
48
    }
49
50
    /**
51
     * An alias for the item.
52
     *
53
     * @param string|string[] $alternateName
54
     *
55
     * @return static
56
     *
57
     * @see http://schema.org/alternateName
58
     */
59
    public function alternateName($alternateName)
60
    {
61
        return $this->setProperty('alternateName', $alternateName);
62
    }
63
64
    /**
65
     * The time interval used to compute the invoice.
66
     *
67
     * @param \Spatie\SchemaOrg\Contracts\DurationContract|\Spatie\SchemaOrg\Contracts\DurationContract[] $billingPeriod
68
     *
69
     * @return static
70
     *
71
     * @see http://schema.org/billingPeriod
72
     */
73
    public function billingPeriod($billingPeriod)
74
    {
75
        return $this->setProperty('billingPeriod', $billingPeriod);
76
    }
77
78
    /**
79
     * An entity that arranges for an exchange between a buyer and a seller.  In
80
     * most cases a broker never acquires or releases ownership of a product or
81
     * service involved in an exchange.  If it is not clear whether an entity is
82
     * a broker, seller, or buyer, the latter two terms are preferred.
83
     *
84
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $broker
85
     *
86
     * @return static
87
     *
88
     * @see http://schema.org/broker
89
     */
90
    public function broker($broker)
91
    {
92
        return $this->setProperty('broker', $broker);
93
    }
94
95
    /**
96
     * A category for the item. Greater signs or slashes can be used to
97
     * informally indicate a category hierarchy.
98
     *
99
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[]|string|string[] $category
100
     *
101
     * @return static
102
     *
103
     * @see http://schema.org/category
104
     */
105
    public function category($category)
106
    {
107
        return $this->setProperty('category', $category);
108
    }
109
110
    /**
111
     * A number that confirms the given order or payment has been received.
112
     *
113
     * @param string|string[] $confirmationNumber
114
     *
115
     * @return static
116
     *
117
     * @see http://schema.org/confirmationNumber
118
     */
119
    public function confirmationNumber($confirmationNumber)
120
    {
121
        return $this->setProperty('confirmationNumber', $confirmationNumber);
122
    }
123
124
    /**
125
     * Party placing the order or paying the invoice.
126
     *
127
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $customer
128
     *
129
     * @return static
130
     *
131
     * @see http://schema.org/customer
132
     */
133
    public function customer($customer)
134
    {
135
        return $this->setProperty('customer', $customer);
136
    }
137
138
    /**
139
     * A description of the item.
140
     *
141
     * @param string|string[] $description
142
     *
143
     * @return static
144
     *
145
     * @see http://schema.org/description
146
     */
147
    public function description($description)
148
    {
149
        return $this->setProperty('description', $description);
150
    }
151
152
    /**
153
     * A sub property of description. A short description of the item used to
154
     * disambiguate from other, similar items. Information from other properties
155
     * (in particular, name) may be necessary for the description to be useful
156
     * for disambiguation.
157
     *
158
     * @param string|string[] $disambiguatingDescription
159
     *
160
     * @return static
161
     *
162
     * @see http://schema.org/disambiguatingDescription
163
     */
164
    public function disambiguatingDescription($disambiguatingDescription)
165
    {
166
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
167
    }
168
169
    /**
170
     * The identifier property represents any kind of identifier for any kind of
171
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
172
     * dedicated properties for representing many of these, either as textual
173
     * strings or as URL (URI) links. See [background
174
     * notes](/docs/datamodel.html#identifierBg) for more details.
175
     *
176
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
177
     *
178
     * @return static
179
     *
180
     * @see http://schema.org/identifier
181
     */
182
    public function identifier($identifier)
183
    {
184
        return $this->setProperty('identifier', $identifier);
185
    }
186
187
    /**
188
     * An image of the item. This can be a [[URL]] or a fully described
189
     * [[ImageObject]].
190
     *
191
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
192
     *
193
     * @return static
194
     *
195
     * @see http://schema.org/image
196
     */
197
    public function image($image)
198
    {
199
        return $this->setProperty('image', $image);
200
    }
201
202
    /**
203
     * Indicates a page (or other CreativeWork) for which this thing is the main
204
     * entity being described. See [background
205
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
206
     *
207
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
208
     *
209
     * @return static
210
     *
211
     * @see http://schema.org/mainEntityOfPage
212
     */
213
    public function mainEntityOfPage($mainEntityOfPage)
214
    {
215
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
216
    }
217
218
    /**
219
     * The minimum payment required at this time.
220
     *
221
     * @param \Spatie\SchemaOrg\Contracts\MonetaryAmountContract|\Spatie\SchemaOrg\Contracts\MonetaryAmountContract[]|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract[] $minimumPaymentDue
222
     *
223
     * @return static
224
     *
225
     * @see http://schema.org/minimumPaymentDue
226
     */
227
    public function minimumPaymentDue($minimumPaymentDue)
228
    {
229
        return $this->setProperty('minimumPaymentDue', $minimumPaymentDue);
230
    }
231
232
    /**
233
     * The name of the item.
234
     *
235
     * @param string|string[] $name
236
     *
237
     * @return static
238
     *
239
     * @see http://schema.org/name
240
     */
241
    public function name($name)
242
    {
243
        return $this->setProperty('name', $name);
244
    }
245
246
    /**
247
     * The date that payment is due.
248
     *
249
     * @param \DateTimeInterface|\DateTimeInterface[] $paymentDue
250
     *
251
     * @return static
252
     *
253
     * @see http://schema.org/paymentDue
254
     */
255
    public function paymentDue($paymentDue)
256
    {
257
        return $this->setProperty('paymentDue', $paymentDue);
258
    }
259
260
    /**
261
     * The date that payment is due.
262
     *
263
     * @param \DateTimeInterface|\DateTimeInterface[] $paymentDueDate
264
     *
265
     * @return static
266
     *
267
     * @see http://schema.org/paymentDueDate
268
     */
269
    public function paymentDueDate($paymentDueDate)
270
    {
271
        return $this->setProperty('paymentDueDate', $paymentDueDate);
272
    }
273
274
    /**
275
     * The name of the credit card or other method of payment for the order.
276
     *
277
     * @param \Spatie\SchemaOrg\Contracts\PaymentMethodContract|\Spatie\SchemaOrg\Contracts\PaymentMethodContract[] $paymentMethod
278
     *
279
     * @return static
280
     *
281
     * @see http://schema.org/paymentMethod
282
     */
283
    public function paymentMethod($paymentMethod)
284
    {
285
        return $this->setProperty('paymentMethod', $paymentMethod);
286
    }
287
288
    /**
289
     * An identifier for the method of payment used (e.g. the last 4 digits of
290
     * the credit card).
291
     *
292
     * @param string|string[] $paymentMethodId
293
     *
294
     * @return static
295
     *
296
     * @see http://schema.org/paymentMethodId
297
     */
298
    public function paymentMethodId($paymentMethodId)
299
    {
300
        return $this->setProperty('paymentMethodId', $paymentMethodId);
301
    }
302
303
    /**
304
     * The status of payment; whether the invoice has been paid or not.
305
     *
306
     * @param \Spatie\SchemaOrg\Contracts\PaymentStatusTypeContract|\Spatie\SchemaOrg\Contracts\PaymentStatusTypeContract[]|string|string[] $paymentStatus
307
     *
308
     * @return static
309
     *
310
     * @see http://schema.org/paymentStatus
311
     */
312
    public function paymentStatus($paymentStatus)
313
    {
314
        return $this->setProperty('paymentStatus', $paymentStatus);
315
    }
316
317
    /**
318
     * Indicates a potential Action, which describes an idealized action in
319
     * which this thing would play an 'object' role.
320
     *
321
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
322
     *
323
     * @return static
324
     *
325
     * @see http://schema.org/potentialAction
326
     */
327
    public function potentialAction($potentialAction)
328
    {
329
        return $this->setProperty('potentialAction', $potentialAction);
330
    }
331
332
    /**
333
     * The service provider, service operator, or service performer; the goods
334
     * producer. Another party (a seller) may offer those services or goods on
335
     * behalf of the provider. A provider may also serve as the seller.
336
     *
337
     * @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $provider
338
     *
339
     * @return static
340
     *
341
     * @see http://schema.org/provider
342
     */
343
    public function provider($provider)
344
    {
345
        return $this->setProperty('provider', $provider);
346
    }
347
348
    /**
349
     * The Order(s) related to this Invoice. One or more Orders may be combined
350
     * into a single Invoice.
351
     *
352
     * @param \Spatie\SchemaOrg\Contracts\OrderContract|\Spatie\SchemaOrg\Contracts\OrderContract[] $referencesOrder
353
     *
354
     * @return static
355
     *
356
     * @see http://schema.org/referencesOrder
357
     */
358
    public function referencesOrder($referencesOrder)
359
    {
360
        return $this->setProperty('referencesOrder', $referencesOrder);
361
    }
362
363
    /**
364
     * URL of a reference Web page that unambiguously indicates the item's
365
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
366
     * official website.
367
     *
368
     * @param string|string[] $sameAs
369
     *
370
     * @return static
371
     *
372
     * @see http://schema.org/sameAs
373
     */
374
    public function sameAs($sameAs)
375
    {
376
        return $this->setProperty('sameAs', $sameAs);
377
    }
378
379
    /**
380
     * The date the invoice is scheduled to be paid.
381
     *
382
     * @param \DateTimeInterface|\DateTimeInterface[] $scheduledPaymentDate
383
     *
384
     * @return static
385
     *
386
     * @see http://schema.org/scheduledPaymentDate
387
     */
388
    public function scheduledPaymentDate($scheduledPaymentDate)
389
    {
390
        return $this->setProperty('scheduledPaymentDate', $scheduledPaymentDate);
391
    }
392
393
    /**
394
     * A CreativeWork or Event about this Thing.
395
     *
396
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
397
     *
398
     * @return static
399
     *
400
     * @see http://schema.org/subjectOf
401
     */
402
    public function subjectOf($subjectOf)
403
    {
404
        return $this->setProperty('subjectOf', $subjectOf);
405
    }
406
407
    /**
408
     * The total amount due.
409
     *
410
     * @param \Spatie\SchemaOrg\Contracts\MonetaryAmountContract|\Spatie\SchemaOrg\Contracts\MonetaryAmountContract[]|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract[] $totalPaymentDue
411
     *
412
     * @return static
413
     *
414
     * @see http://schema.org/totalPaymentDue
415
     */
416
    public function totalPaymentDue($totalPaymentDue)
417
    {
418
        return $this->setProperty('totalPaymentDue', $totalPaymentDue);
419
    }
420
421
    /**
422
     * URL of the item.
423
     *
424
     * @param string|string[] $url
425
     *
426
     * @return static
427
     *
428
     * @see http://schema.org/url
429
     */
430
    public function url($url)
431
    {
432
        return $this->setProperty('url', $url);
433
    }
434
435
}
436