BuktopuhaBotApi::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
namespace Chrl\AppBundle;
3
4
use TelegramBot\Api\BotApi;
5
6
class BuktopuhaBotApi extends BotApi
7
{
8
    public $token;
9
10
    public $botName;
11
12
    public function __construct($config)
13
    {
14
        $this->token = $config['token'];
15
        $this->botName = $config['bot_name'];
16
        parent::__construct($this->token);
17
    }
18
19
    /**
20
     * @param string $token
21
     */
22
    public function setToken($token)
23
    {
24
        $this->token = $token;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getBotName()
31
    {
32
        return $this->botName;
33
    }
34
}
35