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 ( b45687...2691f8 )
by Pascal
01:21
created

SendsNotifications::sendNotification()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
namespace Pbmedia\ApiHealth\Listeners;
4
5
use Illuminate\Notifications\Notification;
6
7
trait SendsNotifications
8
{
9
    /**
10
     * Send the given notification to the notifiable.
11
     *
12
     * @param  \Illuminate\Notifications\Notification $notification
13
     *
14
     * @return null|\Illuminate\Notifications\Notification
15
     */
16
    protected function sendNotification(Notification $notification)
17
    {
18
        if (empty(config('api-health.notifications.via'))) {
19
            return;
20
        }
21
22
        return tap($notification, function ($notification) {
23
            app(config('api-health.notifications.notifiable'))->notify($notification);
24
        });
25
    }
26
}
27