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.

AuthServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace LaravelFlare\Flare\Providers;
4
5
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
6
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
7
8
class AuthServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * The policy mappings for the application.
12
     *
13
     * @var array
14
     */
15
    protected $policies = [
16
                            \LaravelFlare\Flare\Admin\Models\ModelAdmin::class => \LaravelFlare\Flare\Permissions\ModelAdminPolicy::class,
17
                        ];
18
19
    /**
20
     * Register the application's policies.
21
     */
22
    public function registerPolicies()
23
    {
24
        foreach (array_merge($this->policies, \Flare::config('policies')) as $key => $value) {
25
            app(GateContract::class)->policy($key, $value);
26
        }
27
    }
28
29
    /**
30
     * Register any application authentication / authorization services.
31
     *
32
     * @param \Illuminate\Contracts\Auth\Access\Gate $gate
0 ignored issues
show
Bug introduced by
There is no parameter named $gate. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
33
     */
34
    public function boot()
35
    {
36
        $this->registerPolicies(app(GateContract::class));
0 ignored issues
show
Unused Code introduced by
The call to AuthServiceProvider::registerPolicies() has too many arguments starting with app(\Illuminate\Contracts\Auth\Access\Gate::class).

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...
37
    }
38
}
39