Completed
Push — master ( 59b9fb...b4679f )
by Vladimir
02:55
created

PayloadButton::getPayload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
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 name.
14
     *
15
     * @return string
16
     */
17 1
    public function getName(): string
18
    {
19 1
        return 'PayloadButton';
20
    }
21
22
    /**
23
     * Get label.
24
     *
25
     * @return string
26
     */
27 1
    public function getLabel(): string
28
    {
29 1
        return $this->label;
30
    }
31
32
    /**
33
     * Set label.
34
     *
35
     * @param string $label
36
     *
37
     * @return PayloadButton
38
     */
39 1
    public function setLabel(string $label): PayloadButton
40
    {
41 1
        $this->label = $label;
42
43 1
        return $this;
44
    }
45
46
    /**
47
     * Get payload.
48
     *
49
     * @return mixed
50
     */
51 1
    public function getPayload()
52
    {
53 1
        return $this->payload;
54
    }
55
56
    /**
57
     * Set payload.
58
     *
59
     * @param mixed $payload
60
     *
61
     * @return PayloadButton
62
     */
63 1
    public function setPayload($payload): PayloadButton
64
    {
65 1
        $this->payload = $payload;
66
67 1
        return $this;
68
    }
69
}
70