Completed
Push — master ( 5a8248...de4c72 )
by Nikolay
03:57
created

KickMethodTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 21
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\Traits;
6
7
use TgBotApi\BotApiBase\Exception\ResponseException;
8
use TgBotApi\BotApiBase\Method\Interfaces\KickMethodAliasInterface;
9
use TgBotApi\BotApiBase\Method\KickChatMemberMethod;
10
11
trait KickMethodTrait
12
{
13
    /**
14
     * @param KickMethodAliasInterface $method
15
     *
16
     * @throws ResponseException
17
     *
18
     * @return bool
19
     */
20
    abstract public function kick(KickMethodAliasInterface $method): bool;
21
22
    /**
23
     * @param KickChatMemberMethod $method
24
     *
25
     * @throws ResponseException
26
     *
27
     * @return bool
28
     */
29 1
    public function kickChatMember(KickChatMemberMethod $method): bool
30
    {
31 1
        return $this->kick($method);
32
    }
33
}
34