Passed
Branch Helper (0d23ed)
by Nikolay
05:59
created

KickMethodTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 24
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A kickChatMember() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace TgBotApi\BotApiBase\Helper;
6
7
use TgBotApi\BotApiBase\Exception\NormalizationException;
8
use TgBotApi\BotApiBase\Exception\ResponseException;
9
use TgBotApi\BotApiBase\Method\KickChatMemberMethod;
10
11
trait KickMethodTrait
12
{
13
    /**
14
     * @param $method
15
     * @param $type
16
     *
17
     * @throws ResponseException
18
     * @throws NormalizationException
19
     *
20
     * @return mixed
21
     */
22
    abstract public function call($method, $type = null);
23
24
    /**
25
     * @param KickChatMemberMethod $method
26
     *
27
     * @throws ResponseException
28
     * @throws NormalizationException
29
     *
30
     * @return bool
31
     */
32 1
    public function kickChatMember(KickChatMemberMethod $method): bool
33
    {
34 1
        return $this->call($method);
35
    }
36
}
37