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 ( 8c82e7...44f2dc )
by Nikhil
09:16
created

Http/Controllers/API/NotificationController.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace App\Http\Controllers\API;
4
5
use App\Events\NotificationWasDismissed;
6
use App\Notification;
7
use App\Http\Controllers\Controller;
8
use App\Transformers\NotificationTransformer;
9
10
class NotificationController extends Controller
11
{
12
    /**
13
     * NotificationController constructor.
14
     */
15
    public function __construct()
16
    {
17
        $this->middleware('auth');
18
    }
19
20
    /**
21
     * Get all the notifications.
22
     *
23
     * @return array
24
     */
25
    public function all()
26
    {
27
        $notifications = Notification::pending()->get();
28
29
        return fractal()->collection($notifications, new NotificationTransformer)
30
                        ->toArray();
31
    }
32
33
    public function dismiss($id)
34
    {
35
        $notification = Notification::findOrFail($id);
36
        $notification->dismiss();
37
        event(new NotificationWasDismissed($notification));
0 ignored issues
show
The call to NotificationWasDismissed::__construct() has too many arguments starting with $notification.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
38
    }
39
}
40