Completed
Push — master ( 203d4a...ef9e39 )
by
unknown
04:46 queued 02:35
created

InlineQueryResultCachedPhoto::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
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
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent;
15
16
/**
17
 * Class InlineQueryResultCachedPhoto
18
 *
19
 * @link https://core.telegram.org/bots/api#inlinequeryresultcachedphoto
20
 *
21
 * <code>
22
 * $data = [
23
 *   'id'                    => '',
24
 *   'photo_file_id'         => '',
25
 *   'title'                 => '',
26
 *   'description'           => '',
27
 *   'caption'               => '',
28
 *   'reply_markup'          => <InlineKeyboard>,
29
 *   'input_message_content' => <InputMessageContent>,
30
 * ];
31
 * </code>
32
 *
33
 * @method string               getType()                Type of the result, must be photo
34
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
35
 * @method string               getPhotoFileId()         A valid file identifier of the photo
36
 * @method string               getTitle()               Optional. Title for the result
37
 * @method string               getDescription()         Optional. Short description of the result
38
 * @method string               getCaption()             Optional. Caption of the photo to be sent, 0-200 characters
39
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
40
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the photo
41
 *
42
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
43
 * @method $this setPhotoFileId(string $photo_file_id)                              A valid file identifier of the photo
44
 * @method $this setTitle(string $title)                                            Optional. Title for the result
45
 * @method $this setDescription(string $description)                                Optional. Short description of the result
46
 * @method $this setCaption(string $caption)                                        Optional. Caption of the photo to be sent, 0-200 characters
47
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
48
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the photo
49
 */
50
class InlineQueryResultCachedPhoto extends InlineEntity
51
{
52
    /**
53
     * InlineQueryResultCachedPhoto constructor
54
     *
55
     * @param array $data
56
     *
57
     * @throws \Longman\TelegramBot\Exception\TelegramException
58
     */
59
    public function __construct(array $data = [])
60
    {
61
        $data['type'] = 'photo';
62
        parent::__construct($data);
63
    }
64
}
65