ShippingOption::setId()   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 1
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types\Payments;
4
5
use TelegramBot\Api\BaseType;
6
7
/**
8
 * Class ShippingOption
9
 * This object represents one shipping option.
10
 *
11
 * @package TelegramBot\Api\Types\Payments
12
 */
13
class ShippingOption extends BaseType
14
{
15
    /**
16
     * @var array
17
     */
18
    protected static $requiredParams = ['id', 'title', 'prices'];
19
20
    /**
21
     * @var array
22
     */
23
    protected static $map = [
24
        'id' => true,
25
        'title' => true,
26
        'prices' => ArrayOfLabeledPrice::class
27
    ];
28
29
    /**
30
     * Shipping option identifier
31
     *
32
     * @var string
33
     */
34
    protected $id;
35
36
    /**
37
     * Option title
38
     *
39
     * @var string
40
     */
41
    protected $title;
42
43
    /**
44
     * List of price portions
45
     *
46
     * @var array
47
     */
48
    protected $prices;
49
50
    /**
51
     * @author MY
52
     * @return string
53
     */
54
    public function getId()
55
    {
56
        return $this->id;
57
    }
58
59
    /**
60
     * @author MY
61
     *
62
     * @param string $id
63
     *
64
     * @return void
65
     */
66
    public function setId($id)
67
    {
68
        $this->id = $id;
69
    }
70
71
    /**
72
     * @author MY
73
     * @return string
74
     */
75
    public function getTitle()
76
    {
77
        return $this->title;
78
    }
79
80
    /**
81
     * @author MY
82
     *
83
     * @param string $title
84
     *
85
     * @return void
86
     */
87
    public function setTitle($title)
88
    {
89
        $this->title = $title;
90
    }
91
92
    /**
93
     * @author MY
94
     * @return array
95
     */
96
    public function getPrices()
97
    {
98
        return $this->prices;
99
    }
100
101
    /**
102
     * @author MY
103
     *
104
     * @param array $prices
105
     *
106
     * @return void
107
     */
108
    public function setPrices($prices)
109
    {
110
        $this->prices = $prices;
111
    }
112
}
113