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

CreateMethodTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 21
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createNewStickerSet() 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\CreateNewStickerSetMethod;
9
use TgBotApi\BotApiBase\Method\Interfaces\CreateMethodAliasInterface;
10
11
/**
12
 * Trait CreateMethodTrait.
13
 */
14
trait CreateMethodTrait
15
{
16
    /**
17
     * @param CreateMethodAliasInterface $method
18
     *
19
     * @throws ResponseException
20
     *
21
     * @return bool
22
     */
23
    abstract public function create(CreateMethodAliasInterface $method): bool;
24
25
    /**
26
     * @param CreateNewStickerSetMethod $method
27
     *
28
     * @throws ResponseException
29
     *
30
     * @return bool
31
     */
32
    public function createNewStickerSet(CreateNewStickerSetMethod $method): bool
33
    {
34
        return $this->create($method);
35
    }
36
}
37