GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

InputMediaAudio::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 1
b 0
f 0
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\InputMedia;
13
14
use Longman\TelegramBot\Entities\Entity;
15
16
/**
17
 * Class InputMediaAudio
18
 *
19
 * @link https://core.telegram.org/bots/api#inputmediaaudio
20
 *
21
 * <code>
22
 * $data = [
23
 *   'media'      => '123abc',
24
 *   'thumb'      => '456def',
25
 *   'caption'    => '*Audio* caption',
26
 *   'parse_mode' => 'markdown',
27
 *   'duration'   => 42,
28
 *   'performer'  => 'John Doe',
29
 *   'title'      => 'The Song',
30
 * ];
31
 * </code>
32
 *
33
 * @method string          getType()            Type of the result, must be audio
34
 * @method string          getMedia()           File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
35
 * @method string          getThumb()           Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
36
 * @method string          getCaption()         Optional. Caption of the audio to be sent, 0-200 characters
37
 * @method string          getParseMode()       Optional. Mode for parsing entities in the audio caption
38
 * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
39
 * @method int             getDuration()        Optional. Duration of the audio in seconds
40
 * @method string          getPerformer()       Optional. Performer of the audio
41
 * @method string          getTitle()           Optional. Title of the audio
42
 *
43
 * @method $this setMedia(string $media)                     File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
44
 * @method $this setThumb(string $thumb)                     Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
45
 * @method $this setCaption(string $caption)                 Optional. Caption of the audio to be sent, 0-200 characters
46
 * @method $this setParseMode(string $parse_mode)            Optional. Mode for parsing entities in the audio caption
47
 * @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
48
 * @method $this setDuration(int $duration)                  Optional. Duration of the audio in seconds
49
 * @method $this setPerformer(string $performer)             Optional. Performer of the audio
50
 * @method $this setTitle(string $title)                     Optional. Title of the audio
51
 */
52
class InputMediaAudio extends Entity implements InputMedia
53
{
54
    /**
55
     * InputMediaAudio constructor
56
     *
57
     * @param array $data
58
     */
59
    public function __construct(array $data = [])
60
    {
61
        $data['type'] = 'audio';
62
        parent::__construct($data);
63
    }
64
}
65