TelegramBot   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getToken() 0 3 1
A token() 0 3 1
A getEndpoint() 0 3 1
1
<?php
2
3
namespace LeoCarmo\TelegramBot;
4
5
use LeoCarmo\TelegramBot\Model\ChatAction;
6
use LeoCarmo\TelegramBot\Model\Me;
7
use LeoCarmo\TelegramBot\Model\Message;
8
use LeoCarmo\TelegramBot\Model\Photo;
9
10
class TelegramBot
11
{
12
13
    /**
14
     * @var string
15
     */
16
    protected static $telegram_endpoint = 'https://api.telegram.org/bot';
17
18
    /**
19
     * @var string
20
     */
21
    protected static $bot_token;
22
23
    public static function token(string $bot_token)
24
    {
25
        self::$bot_token = $bot_token;
26
    }
27
28
    public static function getToken()
29
    {
30
        return self::$bot_token;
31
    }
32
33
    public static function getEndpoint()
34
    {
35
        return self::$telegram_endpoint;
36
    }
37
38
}