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

Poll   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 53
ccs 0
cts 24
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setId() 0 4 1
A getId() 0 4 1
A setQuestion() 0 4 1
A getQuestion() 0 4 1
A setOptions() 0 4 1
A getOptions() 0 4 1
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