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.

SendsNotifications   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A sendNotification() 0 8 2
1
<?php
2
3
namespace ProtoneMedia\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);
0 ignored issues
show
Bug introduced by
The method notify() does not exist on Illuminate\Contracts\Foundation\Application. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

23
            app(config('api-health.notifications.notifiable'))->/** @scrutinizer ignore-call */ notify($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...
24
        });
25
    }
26
}
27