Passed
Pull Request — master (#232)
by
unknown
03:26
created

Poll::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\InvalidArgumentException;
7
use TelegramBot\Api\TypeInterface;
8
9
class Poll extends BaseType implements TypeInterface
10
{
11
    static protected $requiredParams = ['question', 'options'];
12
13
    protected $id;
14
15
    protected $question;
16
17
    protected $options;
18
19
    /**
20
     * {@inheritdoc}
21
     *
22
     * @var array
23
     */
24
    static protected $map = [
25
        'id' => true,
26
        'question' => true,
27
        'options' => true,
28
        'reply_to_message_id' => false,
29
        'reply_markup' => true
30
    ];
31
32
    public function setId($id)
33
    {
34
        $this->id = $id;
35
    }
36
37
    public function getId()
38
    {
39
        return $this->id;
40
    }
41
42
    public function setQuestion($question)
43
    {
44
        $this->question = $question;
45
    }
46
47
    public function getQuestion()
48
    {
49
        return $this->question;
50
    }
51
52
    public function setOptions($options)
53
    {
54
        $this->options = $options;
55
    }
56
57
    public function getOptions()
58
    {
59
        return $this->options;
60
    }
61
}
62