PollAnswer::setUser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Poll;
6
7
use Zanzara\Telegram\Type\User;
8
9
/**
10
 * This object represents an answer of a user in a non-anonymous poll.
11
 *
12
 * More on https://core.telegram.org/bots/api#pollanswer
13
 */
14
class PollAnswer
15
{
16
17
    /**
18
     * Unique poll identifier
19
     *
20
     * @var string
21
     */
22
    private $poll_id;
23
24
    /**
25
     * The user, who changed the answer to the poll
26
     *
27
     * @var User
28
     */
29
    private $user;
30
31
    /**
32
     * @var int[]
33
     */
34
    private $option_ids;
35
36
    /**
37
     * @return string
38
     */
39
    public function getPollId(): string
40
    {
41
        return $this->poll_id;
42
    }
43
44
    /**
45
     * @param string $poll_id
46
     */
47
    public function setPollId(string $poll_id): void
48
    {
49
        $this->poll_id = $poll_id;
50
    }
51
52
    /**
53
     * @return User
54
     */
55
    public function getUser(): User
56
    {
57
        return $this->user;
58
    }
59
60
    /**
61
     * @param User $user
62
     */
63
    public function setUser(User $user): void
64
    {
65
        $this->user = $user;
66
    }
67
68
    /**
69
     * @return int[]
70
     */
71
    public function getOptionIds(): array
72
    {
73
        return $this->option_ids;
74
    }
75
76
    /**
77
     * @param int[] $option_ids
78
     */
79
    public function setOptionIds(array $option_ids): void
80
    {
81
        $this->option_ids = $option_ids;
82
    }
83
84
}