AuthorizationServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 30
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
1
<?php namespace Arcanesoft\Pages\Providers;
2
3
use Arcanedev\Support\Providers\AuthorizationServiceProvider as ServiceProvider;
4
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
5
6
/**
7
 * Class     AuthorizationServiceProvider
8
 *
9
 * @package  Arcanesoft\Pages\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class AuthorizationServiceProvider extends ServiceProvider
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Properties
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * The policy mappings for the application.
20
     *
21
     * @var array
22
     */
23
    protected $policies = [
24
        //
25
    ];
26
    /* ------------------------------------------------------------------------------------------------
27
     |  Main Functions
28
     | ------------------------------------------------------------------------------------------------
29
     */
30
    /**
31
     * Register any application authentication / authorization services.
32
     *
33
     * @param  \Illuminate\Contracts\Auth\Access\Gate  $gate
34
     */
35 6
    public function boot(GateContract $gate)
36
    {
37 6
        parent::registerPolicies($gate);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (registerPolicies() instead of boot()). Are you sure this is correct? If so, you might want to change this to $this->registerPolicies().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
38
39
        //
40 6
    }
41
}
42