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 ( a14aa2...098aef )
by Peter
07:47
created

MessagebirdChannel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 80%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A send() 0 10 2
1
<?php
2
3
namespace NotificationChannels\Messagebird;
4
5
use Illuminate\Notifications\Notification;
6
7
class MessagebirdChannel
8
{
9
    /** @var \NotificationChannels\Messagebird\MessagebirdClient */
10
    protected $client;
11
12 2
    public function __construct(MessagebirdClient $client)
13
    {
14 2
        $this->client = $client;
15 2
    }
16
17
    /**
18
     * Send the given notification.
19
     *
20
     * @param mixed $notifiable
21
     * @param \Illuminate\Notifications\Notification $notification
22
     *
23
     * @throws \NotificationChannels\MessageBird\Exceptions\CouldNotSendNotification
24
     */
25 1
    public function send($notifiable, Notification $notification)
26
    {
27 1
        $message = $notification->toMessagebird($notifiable);
28
29 1
        if (is_string($message)) {
30
            $message = MessagebirdMessage::create($message);
31
        }
32
33 1
        $this->client->send($message);
34 1
    }
35
}
36