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.

HasButtons::buttons()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 8
cp 0
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
namespace NotificationChannels\Facebook\Traits;
4
5
use NotificationChannels\Facebook\Exceptions\CouldNotCreateMessage;
6
7
/**
8
 * Trait HasButtons.
9
 */
10
trait HasButtons
11
{
12
    /** @var array Call to Action Buttons */
13
    protected $buttons = [];
14
15
    /**
16
     * Add up to 3 call to action buttons.
17
     *
18
     * @param  array  $buttons
19
     *
20
     * @throws CouldNotCreateMessage
21
     * @return $this
22
     */
23
    public function buttons(array $buttons = []): self
24
    {
25
        if (count($buttons) > 3) {
26
            throw CouldNotCreateMessage::messageButtonsLimitExceeded();
27
        }
28
29
        $this->buttons = $buttons;
30
31
        return $this;
32
    }
33
}
34