InlineQueryResultPhoto::__construct()   A
last analyzed

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 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Telegram\Bot\Objects\InlineQuery;
4
5
/**
6
 * Class InlineQueryResultPhoto
7
 *
8
 * <code>
9
 * $params = [
10
 *   'id'                       => '',
11
 *   'photo_url'                => '',
12
 *   'thumb_url'                => '',
13
 *   'photo_width'              => '',
14
 *   'photo_height'             => '',
15
 *   'title'                    => '',
16
 *   'description'              => '',
17
 *   'caption'                  => '',
18
 *   'reply_markup'             => '',
19
 *   'input_message_content'    => '',
20
 * ];
21
 * </code>
22
 *
23
 * @link https://core.telegram.org/bots/api#inlinequeryresultphoto
24
 *
25
 * @method $this setId($string)                  Unique identifier for this result, 1-64 Bytes
26
 * @method $this setPhotoUrl($string)            A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB
27
 * @method $this setThumbUrl($string)            URL of the thumbnail for the photo
28
 * @method $this setPhotoWidth($int)             Optional. Width of the photo
29
 * @method $this setPhotoHeight($int)            Optional. Height of the photo
30
 * @method $this setTitle($string)               Optional. Title for the result
31
 * @method $this setDescription($string)         Optional. Short description of the result
32
 * @method $this setCaption($string)             Optional. Caption of the photo to be sent, 0-200 characters
33
 * @method $this setReplyMarkup($object)         Optional. Inline keyboard attached to the message
34
 * @method $this setInputMessageContent($object) Optional. Content of the message to be sent instead of the photo
35
 */
36
class InlineQueryResultPhoto extends InlineBaseObject
37
{
38
    public function __construct($params = [])
39
    {
40
        parent::__construct($params);
41
        $this->put('type', 'photo');
42
    }
43
}
44