LabeledPrice::getAmount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types\Payments;
4
5
use TelegramBot\Api\BaseType;
6
7
/**
8
 * Class LabeledPrice
9
 * This object represents a portion of the price for goods or services.
10
 *
11
 * @package TelegramBot\Api\Types\Payments
12
 */
13
class LabeledPrice extends BaseType
14
{
15
    /**
16
     * @var array
17
     */
18
    protected static $requiredParams = ['label', 'amount'];
19
20
    /**
21
     * @var array
22
     */
23
    protected static $map = [
24
        'label' => true,
25
        'amount' => true
26
    ];
27
28
    /**
29
     * Portion label
30
     *
31
     * @var string
32
     */
33
    protected $label;
34
35
    /**
36
     * Price of the product in the smallest units of the currency (integer, not float/double).
37
     *
38
     * @var int
39
     */
40
    protected $amount;
41
42
    /**
43
     * @return string
44
     */
45
    public function getLabel()
46
    {
47
        return $this->label;
48
    }
49
50
    /**
51
     * @param string $label
52
     *
53
     * @return void
54
     */
55
    public function setLabel($label)
56
    {
57
        $this->label = $label;
58
    }
59
60
    /**
61
     * @return int
62
     */
63
    public function getAmount()
64
    {
65
        return $this->amount;
66
    }
67
68
    /**
69
     * @param int $amount
70
     *
71
     * @return void
72
     */
73
    public function setAmount($amount)
74
    {
75
        $this->amount = $amount;
76
    }
77
}
78