Passed
Pull Request — develop (#1491)
by Rabie
14:52
created

InputPollOption::subEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
/**
4
 * This file is part of the TelegramBot package.
5
 *
6
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Longman\TelegramBot\Entities\Poll;
13
14
use Longman\TelegramBot\Entities\Entity;
15
use Longman\TelegramBot\Entities\MessageEntity;
16
17
/**
18
 * Class InputPollOption
19
 *
20
 * This entity contains information about one answer option in a poll to be sent.
21
 *
22
 * @link https://core.telegram.org/bots/api#inputpolloption
23
 *
24
 * @method string          getText()                 Option text, 1-100 characters
25
 * @method MessageEntity[] getTextEntities()         Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode
26
 */
27
class InputPollOption extends Entity
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    protected function subEntities(): array
33
    {
34
        return [
35
            'text_entities' => [MessageEntity::class],
36
        ];
37
    }
38
}
39