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.

LobChannel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 32
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A send() 0 12 3
1
<?php
2
3
namespace NotificationChannels\Lob;
4
5
use Illuminate\Notifications\Notification;
6
use Lob\Lob;
7
8
class LobChannel
9
{
10
    /** @var \Lob\Lob */
11
    protected $lob;
12
13
    /**
14
     * @param \Lob\Lob $lob
15
     */
16
    public function __construct(Lob $lob)
17
    {
18
        $this->lob = $lob;
19
    }
20
21
    /**
22
     * Send the given notification.
23
     *
24
     * @param mixed $notifiable
25
     * @param \Illuminate\Notifications\Notification $notification
26
     */
27
    public function send($notifiable, Notification $notification)
28
    {
29
        $message = $notification->toLobPostcard($notifiable);
0 ignored issues
show
Bug introduced by
The method toLobPostcard() does not seem to exist on object<Illuminate\Notifications\Notification>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
30
31
        $messageContent = $message->toArray();
32
33
        if (($address = $notifiable->routeNotificationFor('Lob')) && ! isset($messageContent['to'])) {
34
            $messageContent['to'] = $address;
35
        }
36
37
        $this->lob->{$message->type}()->create($messageContent);
38
    }
39
}
40