GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( da90f7...c29a3b )
by Gallice
35s
created

Button::getButtons()   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 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
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
namespace Tgallice\FBMessenger\Attachment\Structured;
4
5
use Tgallice\FBMessenger\Attachment\Structured;
6
use Tgallice\FBMessenger\Model\Button as ButtonModel;
7
8
class Button extends Structured
9
{
10
    const TEMPLATE_TYPE = 'button';
11
12
    /**
13
     * @param null|string $text
14
     * @param ButtonModel[] $buttons
15
     */
16 7
    public function __construct($text = null, array $buttons = [])
17
    {
18 7
        $this->payload = [
19 7
            'template_type' => self::TEMPLATE_TYPE,
20 7
            'text' => $text,
21 7
            'buttons' => $buttons,
22
        ];
23 7
    }
24
25
    /**
26
     * @return null|string
27
     */
28 1
    public function getText()
29
    {
30 1
        return $this->payload['text'];
31
    }
32
33
    /**
34
     * @return array
35
     */
36 1
    public function getButtons()
37
    {
38 1
        return $this->payload['buttons'];
39
    }
40
}
41