Dice::setEmoji()   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 0
Metric Value
eloc 1
c 0
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\TypeInterface;
7
8
/**
9
 * Class Dice
10
 * This object represents an animated emoji that displays a random value.
11
 */
12
class Dice extends BaseType implements TypeInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     *
17
     * @var array
18
     */
19
    protected static $requiredParams = ['emoji', 'value'];
20
21
    /**
22
     * {@inheritdoc}
23
     *
24
     * @var array
25
     */
26
    protected static $map = [
27
        'emoji' => true,
28
        'value' => true
29
    ];
30
31
    /**
32
     * Emoji on which the dice throw animation is based
33
     *
34
     * @var string
35
     */
36
    protected $emoji;
37
38
    /**
39
     * Value of the dice, 1-6 for “🎲” and “🎯” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji
40
     *
41
     * @var int
42
     */
43
    protected $value;
44
45
    /**
46
     * @return string
47
     */
48
    public function getEmoji()
49
    {
50
        return $this->emoji;
51
    }
52
53
    /**
54
     * @param string $emoji
55
     * @return void
56 2
     */
57
    public function setEmoji($emoji)
58 2
    {
59 2
        $this->emoji = $emoji;
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getValue()
66
    {
67
        return $this->value;
68
    }
69
70
    /**
71
     * @param int $value
72 2
     * @return void
73
     */
74 2
    public function setValue($value)
75 2
    {
76
        $this->value = $value;
77
    }
78
}
79