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.

SendChatAction   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 69
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getAction() 0 3 1
A setAction() 0 5 1
A setChatId() 0 5 1
A getChatId() 0 3 1
1
<?php
2
3
/**
4
 * Class that represents Telegram's Bot-API "sendChatAction" 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
15
class SendChatAction extends AbstractMethod
16
{
17
    const NAME                   = 'sendChatAction';
18
19
    const RETURN_ENTITY          = Message::class;
20
21
    const ACTION_TYPING          = 'typing';
22
23
    const ACTION_UPLOAD_PHOTO    = 'upload_photo';
24
25
    const ACTION_RECORD_VIDEO    = 'record_video';
26
27
    const ACTION_UPLOAD_VIDEO    = 'upload_video';
28
29
    const ACTION_RECORD_AUDIO    = 'record_audio';
30
31
    const ACTION_UPLOAD_AUDIO    = 'upload_audio';
32
33
    const ACTION_UPLOAD_DOCUMENT = 'upload_document';
34
35
    const ACTION_FIND_LOCATION   = 'find_location';
36
37
    protected $chat_id;
38
39
    protected $action;
40
41
    protected $supportedProperties = [
42
        'chat_id' => true,
43
        'action'  => true
44
    ];
45
46
    /**
47
     * @return string
48
     */
49
    public function getChatId()
50
    {
51
        return $this->chat_id;
52
    }
53
54
    /**
55
     * @param string $chat_id
56
     *
57
     * @return $this
58
     */
59
    public function setChatId($chat_id)
60
    {
61
        $this->chat_id = $chat_id;
62
63
        return $this;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getAction()
70
    {
71
        return $this->action;
72
    }
73
74
    /**
75
     * @param string $action
76
     *
77
     * @return $this
78
     */
79
    public function setAction($action)
80
    {
81
        $this->action = $action;
82
83
        return $this;
84
    }
85
}
86