Completed
Push — master ( aedb8a...d04b6a )
by Nikolay
05:04
created

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