successfulPayment::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * This object contains basic information about a successful payment.
9
 */
10
class successfulPayment extends types {
0 ignored issues
show
Bug introduced by
The type BPT\types\types was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
    /** Keep all properties which has sub properties */
12
    private const subs = ['order_info' => 'BPT\types\orderInfo'];
13
14
    /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
15
    public string $currency;
16
17
    /**
18
     * Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$
19
     * 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the
20
     * decimal point for each currency (2 for the majority of currencies).
21
     */
22
    public int $total_amount;
23
24
    /** Bot specified invoice payload */
25
    public string $invoice_payload;
26
27
    /** Optional. Identifier of the shipping option chosen by the user */
28
    public null|string $shipping_option_id = null;
29
30
    /** Optional. Order information provided by the user */
31
    public null|orderInfo $order_info = null;
32
33
    /** Telegram payment identifier */
34
    public string $telegram_payment_charge_id;
35
36
    /** Provider payment identifier */
37
    public string $provider_payment_charge_id;
38
39
40
    public function __construct(stdClass|null $object = null) {
41
        if ($object != null) {
42
            parent::__construct($object, self::subs);
43
        }
44
    }
45
}
46