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

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