PollAnswer::subEntities()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace TelegramBot\Entities;
5
6
use TelegramBot\Entity;
7
8
/**
9
 * Class PollAnswer
10
 *
11
 * This entity represents an answer of a user in a non-anonymous poll.
12
 *
13
 * @link https://core.telegram.org/bots/api#pollanswer
14
 *
15
 * @method string getPollId()    Unique poll identifier
16
 * @method User   getUser()      The user, who changed the answer to the poll
17
 * @method array  getOptionIds() 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.
18
 */
19
class PollAnswer extends Entity
20
{
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected function subEntities(): array
26
    {
27
        return [
28
            'user' => User::class,
29
        ];
30
    }
31
32
}
33