BotCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 47
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A getCommand() 0 3 1
A setCommand() 0 3 1
A setDescription() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Miscellaneous;
6
7
/**
8
 * This object represents a bot command.
9
 *
10
 * More on https://core.telegram.org/bots/api#botcommand
11
 */
12
class BotCommand
13
{
14
15
    /**
16
     * Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.
17
     *
18
     * @var string
19
     */
20
    private $command;
21
22
    /**
23
     * Description of the command, 3-256 characters.
24
     *
25
     * @var string
26
     */
27
    private $description;
28
29
    /**
30
     * @return string
31
     */
32
    public function getCommand(): string
33
    {
34
        return $this->command;
35
    }
36
37
    /**
38
     * @param string $command
39
     */
40
    public function setCommand(string $command): void
41
    {
42
        $this->command = $command;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getDescription(): string
49
    {
50
        return $this->description;
51
    }
52
53
    /**
54
     * @param string $description
55
     */
56
    public function setDescription(string $description): void
57
    {
58
        $this->description = $description;
59
    }
60
61
}