Game   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 6 1
1
<?php
2
3
namespace TelegramBot\Entities\Games;
4
5
use TelegramBot\Entities\Animation;
6
use TelegramBot\Entities\MessageEntity;
7
use TelegramBot\Entities\PhotoSize;
8
use TelegramBot\Entity;
9
10
/**
11
 * Class Game
12
 *
13
 * This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
14
 *
15
 * @link https://core.telegram.org/bots/api#game
16
 *
17
 * @method string          getTitle()        Title of the game
18
 * @method string          getDescription()  Description of the game
19
 * @method PhotoSize[]     getPhoto()        Photo that will be displayed in the game message in chats.
20
 * @method string          getText()         Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
21
 * @method MessageEntity[] getTextEntities() Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
22
 * @method Animation       getAnimation()    Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
23
 **/
24
class Game extends Entity
25
{
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    protected function subEntities(): array
31
    {
32
        return [
33
            'photo' => [PhotoSize::class],
34
            'text_entities' => [MessageEntity::class],
35
            'animation' => Animation::class,
36
        ];
37
    }
38
39
}
40