InlineQueryResultCachedMpeg4GifType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 55
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Greenplugin\TelegramBot\Type\InlineQueryResult;
6
7
use Greenplugin\TelegramBot\Method\Interfaces\HasParseModeVariableInterface;
8
use Greenplugin\TelegramBot\Method\Traits\FillFromArrayTrait;
9
use Greenplugin\TelegramBot\Type\InputMessageContent\InputMessageContentType;
10
11
/**
12
 * Class InlineQueryResultCachedMpeg4GifType.
13
 *
14
 * @see https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif
15
 */
16
class InlineQueryResultCachedMpeg4GifType extends InlineQueryResultType implements HasParseModeVariableInterface
17
{
18
    use FillFromArrayTrait;
19
    /**
20
     * A valid file identifier for the MP4 file.
21
     *
22
     * @var string
23
     */
24
    public $mpeg4FileId;
25
26
    /**
27
     * Optional. Title for the result.
28
     *
29
     * @var string|null
30
     */
31
    public $title;
32
33
    /**
34
     * Optional. Caption of the GIF file to be sent, 0-1024 characters.
35
     *
36
     * @var string|null
37
     */
38
    public $caption;
39
40
    /**
41
     * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic,
42
     * fixed-width text or inline URLs in the media caption.
43
     *
44
     * @var string|null
45
     */
46
    public $parseMode;
47
48
    /**
49
     * Optional. Content of the message to be sent instead of the GIF animation.
50
     *
51
     * @var InputMessageContentType|null
52
     */
53
    public $inputMessageContent;
54
55
    /**
56
     * InlineQueryResultCachedMpeg4GifType constructor.
57
     *
58
     * @param string     $id
59
     * @param string     $mpeg4FileId
60
     * @param array|null $data
61
     *
62
     * @throws \Greenplugin\TelegramBot\Exception\BadArgumentException
63
     */
64
    public function __construct(string $id, string $mpeg4FileId, array $data = null)
65
    {
66
        $this->type = self::TYPE_MPEG4GIF;
67
        $this->id = $id;
68
        $this->mpeg4FileId = $mpeg4FileId;
69
        if ($data) {
70
            $this->fill($data);
71
        }
72
    }
73
}
74