BotCommand::setCommand()   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 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\Collection\CollectionItemInterface;
7
use TelegramBot\Api\TypeInterface;
8
9
class BotCommand extends BaseType implements TypeInterface, CollectionItemInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     *
14
     * @var array
15
     */
16
    protected static $requiredParams = ['command', 'description'];
17
18
    /**
19
     * {@inheritdoc}
20
     *
21
     * @var array
22
     */
23
    protected static $map = [
24
        'command' => true,
25
        'description' => true,
26
    ];
27
28
    /**
29
     * Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.
30
     *
31
     * @var string
32
     */
33
    protected $command;
34
35
    /**
36
     * Description of the command, 3-256 characters.
37
     *
38
     * @var string
39
     */
40
    protected $description;
41
42
    /**
43
     * @return string
44 2
     */
45
    public function getCommand()
46 2
    {
47
        return $this->command;
48
    }
49
50
    /**
51
     * @param string $command
52 3
     * @return void
53
     */
54 3
    public function setCommand($command)
55 3
    {
56
        $this->command = $command;
57
    }
58
59
    /**
60 2
     * @return string
61
     */
62 2
    public function getDescription()
63
    {
64
        return $this->description;
65
    }
66
67
    /**
68 3
     * @param string $description
69
     * @return void
70 3
     */
71 3
    public function setDescription($description)
72
    {
73
        $this->description = $description;
74
    }
75
}
76