Game   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 11
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 6 1
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\Games;
13
14
use Longman\TelegramBot\Entities\Animation;
15
use Longman\TelegramBot\Entities\Entity;
16
use Longman\TelegramBot\Entities\MessageEntity;
17
use Longman\TelegramBot\Entities\PhotoSize;
18
19
/**
20
 * Class Game
21
 *
22
 * This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
23
 *
24
 * @link https://core.telegram.org/bots/api#game
25
 *
26
 * @method string          getTitle()        Title of the game
27
 * @method string          getDescription()  Description of the game
28
 * @method PhotoSize[]     getPhoto()        Photo that will be displayed in the game message in chats.
29
 * @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.
30
 * @method MessageEntity[] getTextEntities() Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
31
 * @method Animation       getAnimation()    Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
32
 **/
33
class Game extends Entity
34
{
35
    /**
36
     * {@inheritdoc}
37
     */
38
    protected function subEntities(): array
39
    {
40
        return [
41
            'photo'         => [PhotoSize::class],
42
            'text_entities' => [MessageEntity::class],
43
            'animation'     => Animation::class,
44
        ];
45
    }
46
}
47