Completed
Push — master ( ed5034...64bcd9 )
by Armando
02:01
created

InlineQueryResultGame::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * This file is part of the TelegramBot package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\TelegramBot\Entities\InlineQuery;
12
13
use Longman\TelegramBot\Entities\InlineKeyboard;
14
15
/**
16
 * Class InlineQueryResultGame
17
 *
18
 * @link https://core.telegram.org/bots/api#inlinequeryresultgame
19
 *
20
 * <code>
21
 * $data = [
22
 *   'id'              => '',
23
 *   'game_short_name' => '',
24
 *   'reply_markup'    => <InlineKeyboard>,
25
 * ];
26
 * </code>
27
 *
28
 * @method string         getType()          Type of the result, must be game
29
 * @method string         getId()            Unique identifier for this result, 1-64 bytes
30
 * @method string         getGameShortName() Short name of the game
31
 * @method InlineKeyboard getReplyMarkup()   Optional. Inline keyboard attached to the message
32
 *
33
 * @method $this setId(string $id)                            Unique identifier for this result, 1-64 bytes
34
 * @method $this setGameShortName(string $game_short_name)    Short name of the game
35
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message
36
 */
37
class InlineQueryResultGame extends InlineEntity implements InlineQueryResult
38
{
39
    /**
40
     * InlineQueryResultGame constructor
41
     *
42
     * @param array $data
43
     *
44
     * @throws \Longman\TelegramBot\Exception\TelegramException
45
     */
46
    public function __construct(array $data = [])
47
    {
48
        $data['type'] = 'game';
49
        parent::__construct($data);
50
    }
51
}
52