Completed
Push — master ( fd6927...230b3b )
by
unknown
07:38
created

InlineKeyboardMarkup   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 50
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getInlineKeyboard() 0 4 1
A setInlineKeyboard() 0 4 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
    static protected $requiredParams = ['inline_keyboard'];
21
22
    /**
23
     * {@inheritdoc}
24
     *
25
     * @var array
26
     */
27
    static protected $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
    public function setInlineKeyboard($inlineKeyboard)
59
    {
60 2
        $this->inlineKeyboard = $inlineKeyboard;
61 2
    }
62
}
63