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

CreateMethodTrait::createNewStickerSet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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