Completed
Push — master ( ef4497...684c4e )
by Kirill
02:16
created

BuktopuhaBotApi   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setToken() 0 4 1
1
<?php
2
namespace Chrl\AppBundle;
3
4
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
5
use Symfony\Component\DependencyInjection\ContainerInterface;
6
use TelegramBot\Api\BotApi;
7
8
class BuktopuhaBotApi extends BotApi
9
{
10
    public $token;
11
12
    public function __construct($config)
13
    {
14
        $this->token = $config['token'];
15
        parent::__construct($this->token);
16
    }
17
18
    /**
19
     * @param string $token
20
     */
21
    public function setToken($token)
22
    {
23
        $this->token = $token;
24
    }
25
}
26