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.
Completed
Push — master ( 5ac723...c719eb )
by Stan
07:02
created

SendVideo::getVideo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * Class that represents Telegram's Bot-API "sendVideo" method.
5
 *
6
 * @package Teebot (Telegram bot framework)
7
 *
8
 * @author Stanislav Drozdov <[email protected]>
9
 */
10
11
namespace Teebot\Api\Method;
12
13
use Teebot\Api\Entity\Message;
14
use Teebot\Api\Entity\InputFile;
15
use Teebot\Api\Traits\File;
16
17 View Code Duplication
class SendVideo extends AbstractMethod
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
{
19
    use File;
20
21
    const NAME          = 'sendVideo';
22
23
    const RETURN_ENTITY = Message::class;
24
25
    protected $chat_id;
26
27
    protected $video;
28
29
    protected $duration;
30
31
    protected $width;
32
33
    protected $height;
34
35
    protected $caption;
36
37
    protected $disable_notification;
38
39
    protected $reply_to_message_id;
40
41
    protected $reply_markup;
42
43
    protected $supportedProperties = [
44
        'chat_id'              => true,
45
        'video'                => true,
46
        'duration'             => false,
47
        'width'                => false,
48
        'height'               => false,
49
        'caption'              => false,
50
        'disable_notification' => false,
51
        'reply_to_message_id'  => false,
52
        'reply_markup'         => false
53
    ];
54
55
    /**
56
     * @return \CURLFile|string
57
     */
58
    public function getVideo()
59
    {
60
        return $this->video;
61
    }
62
63
    /**
64
     * @param string $video
65
     *
66
     * @return $this
67
     */
68
    public function setVideo($video)
69
    {
70
        $this->video = $this->initInputFile($video);
71
72
        return $this;
73
    }
74
}
75