UnbanMethodTrait   A
last analyzed

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 unbanChatMember() 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\UnbanMethodAliasInterface;
9
use TgBotApi\BotApiBase\Method\UnbanChatMemberMethod;
10
11
/**
12
 * Trait UnbanMethodTrait.
13
 */
14
trait UnbanMethodTrait
15
{
16
    /**
17
     * @param UnbanMethodAliasInterface $method
18
     *
19
     * @throws ResponseException
20
     *
21
     * @return bool
22
     */
23
    abstract public function unban(UnbanMethodAliasInterface $method): bool;
24
25
    /**
26
     * @param UnbanChatMemberMethod $method
27
     *
28
     * @throws ResponseException
29
     *
30
     * @return bool
31
     */
32 2
    public function unbanChatMember(UnbanChatMemberMethod $method): bool
33
    {
34 2
        return $this->unban($method);
35
    }
36
}
37