Passed
Push — master ( 6140a2...ff30ae )
by
unknown
09:50
created

InputMedia   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 116
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 1
dl 0
loc 116
ccs 0
cts 20
cp 0
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A setType() 0 4 1
A getMedia() 0 4 1
A setMedia() 0 4 1
A getCaption() 0 4 1
A setCaption() 0 4 1
A getParseMode() 0 4 1
A setParseMode() 0 4 1
1
<?php
2
3
namespace TelegramBot\Api\Types\InputMedia;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\Collection\CollectionItemInterface;
7
8
/**
9
 * Class InputMedia
10
 * This object represents the content of a media message to be sent.
11
 *
12
 * @package TelegramBot\Api
13
 */
14
class InputMedia extends BaseType implements CollectionItemInterface
15
{
16
    /**
17
     * {@inheritdoc}
18
     *
19
     * @var array
20
     */
21
    static protected $requiredParams = ['type', 'media'];
22
23
    /**
24
     * {@inheritdoc}
25
     *
26
     * @var array
27
     */
28
    static protected $map = [
29
        'type' => true,
30
        'media' => true,
31
        'caption' => true,
32
        'parse_mode' => true,
33
    ];
34
35
    /**
36
     * Type of the result.
37
     *
38
     * @var string
39
     */
40
    protected $type;
41
42
    /**
43
     * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended),
44
     * pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>"
45
     * to upload a new one using multipart/form-data under <file_attach_name> name.
46
     *
47
     * @var string
48
     */
49
    protected $media;
50
51
    /**
52
     * Optional. Caption of the photo to be sent, 0-200 characters.
53
     *
54
     * @var string
55
     */
56
    protected $caption;
57
58
    /**
59
     * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic,
60
     * fixed-width text or inline URLs in the media caption.
61
     *
62
     * @var string
63
     */
64
    protected $parseMode;
65
66
    /**
67
     * @return string
68
     */
69
    public function getType()
70
    {
71
        return $this->type;
72
    }
73
74
    /**
75
     * @param string $type
76
     */
77
    public function setType($type)
78
    {
79
        $this->type = $type;
80
    }
81
82
    /**
83
     * @return string
84
     */
85
    public function getMedia()
86
    {
87
        return $this->media;
88
    }
89
90
    /**
91
     * @param string $media
92
     */
93
    public function setMedia($media)
94
    {
95
        $this->media = $media;
96
    }
97
98
    /**
99
     * @return string
100
     */
101
    public function getCaption()
102
    {
103
        return $this->caption;
104
    }
105
106
    /**
107
     * @param string $caption
108
     */
109
    public function setCaption($caption)
110
    {
111
        $this->caption = $caption;
112
    }
113
114
    /**
115
     * @return string
116
     */
117
    public function getParseMode()
118
    {
119
        return $this->parseMode;
120
    }
121
122
    /**
123
     * @param string $parseMode
124
     */
125
    public function setParseMode($parseMode)
126
    {
127
        $this->parseMode = $parseMode;
128
    }
129
}
130