Completed
Push — master ( 44dea0...59b9fb )
by Vladimir
02:47
created

PayloadButton::setLabel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Templates\Keyboard;
6
7
class PayloadButton implements Button
8
{
9
    private $label;
10
    private $payload;
11
12
    /**
13
     * Get label.
14
     *
15
     * @return string
16
     */
17 1
    public function getLabel(): string
18
    {
19 1
        return $this->label;
20
    }
21
22
    /**
23
     * Set label.
24
     *
25
     * @param string $label
26
     *
27
     * @return PayloadButton
28
     */
29 1
    public function setLabel(string $label): PayloadButton
30
    {
31 1
        $this->label = $label;
32
33 1
        return $this;
34
    }
35
36
    /**
37
     * Get payload.
38
     *
39
     * @return mixed
40
     */
41 1
    public function getPayload()
42
    {
43 1
        return $this->payload;
44
    }
45
46
    /**
47
     * Set payload.
48
     *
49
     * @param mixed $payload
50
     *
51
     * @return PayloadButton
52
     */
53 1
    public function setPayload($payload): PayloadButton
54
    {
55 1
        $this->payload = $payload;
56
57 1
        return $this;
58
    }
59
}
60