PollAnswer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 10
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
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