Completed
Push — master ( 9c36f0...546acb )
by ARCANEDEV
04:57
created

AuthorizationServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php namespace Arcanesoft\Auth\Providers;
2
3
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
4
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
5
6
/**
7
 * Class     AuthorizationServiceProvider
8
 *
9
 * @package  Arcanesoft\Auth\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
     |  Main Functions
27
     | ------------------------------------------------------------------------------------------------
28
     */
29
    /**
30
     * Register any application authentication / authorization services.
31
     *
32
     * @param  \Illuminate\Contracts\Auth\Access\Gate  $gate
33
     */
34 18
    public function boot(GateContract $gate)
35
    {
36 18
        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...
37 18
    }
38
}
39