UnbanMethodTrait::unbanChatMember()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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