Test Failed
Pull Request — master (#250)
by
unknown
02:21
created

Dice::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\TypeInterface;
7
8
/**
9
 * Class Dice
10
 * This object represents a dice with random value from 1 to 6. (Yes, we're aware of the “proper” singular of die.
11
 * But it's awkward, and we decided to help it change. One dice at a time!)
12
 */
13
class Dice extends BaseType implements TypeInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     *
18
     * @var array
19
     */
20
    static protected $requiredParams = ['value'];
21
22
    /**
23
     * {@inheritdoc}
24
     *
25
     * @var array
26
     */
27
    static protected $map = ['value'];
28
29
    /**
30
     * Value of the dice, 1-6
31
     *
32
     * @var int
33
     */
34
    protected $value;
35
36
    /**
37
     * @return int
38
     */
39
    public function getValue()
40
    {
41
        return $this->value;
42
    }
43
44
    /**
45
     * @param int $value
46
     */
47
    public function setValue($value)
48
    {
49
        $this->value = $value;
50
    }
51
}