InlineKeyboardMarkup::getInlineKeyboard()   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 0
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: YaroslavMolchan
5
 * Date: 16/03/17
6
 * Time: 22:15
7
 */
8
9
namespace TelegramBot\Api\Types\Inline;
10
11
use TelegramBot\Api\BaseType;
12
13
class InlineKeyboardMarkup extends BaseType
14
{
15
    /**
16
     * {@inheritdoc}
17
     *
18
     * @var array
19
     */
20
    protected static $requiredParams = ['inline_keyboard'];
21
22
    /**
23
     * {@inheritdoc}
24
     *
25
     * @var array
26
     */
27
    protected static $map = [
28
        'inline_keyboard' => true,
29
    ];
30
31
    /**
32
     * Array of button rows, each represented by an Array of InlineKeyboardButton objects
33
     * Array of Array of InlineKeyboardButton
34
     *
35
     * @var array
36
     */
37
    protected $inlineKeyboard;
38
39
    /**
40
     * @param array $inlineKeyboard
41
     */
42 3
    public function __construct($inlineKeyboard = [])
43
    {
44 3
        $this->inlineKeyboard = $inlineKeyboard;
45 3
    }
46
47
    /**
48
     * @return array
49
     */
50 1
    public function getInlineKeyboard()
51
    {
52 1
        return $this->inlineKeyboard;
53
    }
54
55
    /**
56
     * @param array $inlineKeyboard
57
     *
58 2
     * @return void
59
     */
60 2
    public function setInlineKeyboard($inlineKeyboard)
61 2
    {
62
        $this->inlineKeyboard = $inlineKeyboard;
63
    }
64
}
65