LabeledPrice::setAmount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Shipping;
6
7
/**
8
 * This object represents a portion of the price for goods or services.
9
 *
10
 * More on https://core.telegram.org/bots/api#labeledprice
11
 */
12
class LabeledPrice
13
{
14
15
    /**
16
     * Portion label
17
     *
18
     * @var string
19
     */
20
    private $label;
21
22
    /**
23
     * Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of
24
     * US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the
25
     * decimal point for each currency (2 for the majority of currencies).
26
     *
27
     * @var int
28
     */
29
    private $amount;
30
31
    /**
32
     * @return string
33
     */
34
    public function getLabel(): string
35
    {
36
        return $this->label;
37
    }
38
39
    /**
40
     * @param string $label
41
     */
42
    public function setLabel(string $label): void
43
    {
44
        $this->label = $label;
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getAmount(): int
51
    {
52
        return $this->amount;
53
    }
54
55
    /**
56
     * @param int $amount
57
     */
58
    public function setAmount(int $amount): void
59
    {
60
        $this->amount = $amount;
61
    }
62
63
}