Passed
Pull Request — master (#251)
by
unknown
02:24
created

Dice::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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