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.

Issues (4)

src/Http/Middleware/Authorize.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Spatie\WebTinker\Http\Middleware;
4
5
use Illuminate\Support\Facades\Gate;
6
7
class Authorize
8
{
9
    public function handle($request, $next)
10
    {
11
        return $this->allowedToUseTinker()
12
            ? $next($request)
13
            : abort(403);
0 ignored issues
show
Are you sure the usage of abort(403) is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
14
    }
15
16
    protected function allowedToUseTinker(): bool
17
    {
18
        if (! config('web-tinker.enabled')) {
19
            return false;
20
        }
21
22
        return Gate::check('viewWebTinker');
23
    }
24
}
25