Completed
Push — master ( a9781c...2d7ec6 )
by Mahmoud
02:49
created

AuthServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
1
<?php
2
3
namespace App\Containers\Application\Providers;
4
5
use App\Containers\Application\Models\Application;
6
use App\Containers\Application\Policies\ApplicationPolicy;
7
use App\Port\Policy\Providers\PortAuthServiceProvider;
8
9
10
/**
11
 * Class AuthServiceProvider.
12
 *
13
 * This Provider is designed to map the policies to their models.
14
 * Must be manually added to the list of extra service providers in the
15
 * containers config file in order to get registered in the framework.
16
 *
17
 * @author Mahmoud Zalt <[email protected]>
18
 */
19
class AuthServiceProvider extends PortAuthServiceProvider
20
{
21
22
    /**
23
     * The policy mappings for the application.
24
     *
25
     * @var array
26
     */
27
    protected $policies = [
28
        Application::class => ApplicationPolicy::class,
29
    ];
30
31
    /**
32
     * Register any application authentication / authorization services.
33
     *
34
     * @return void
35
     */
36
    public function boot()
37
    {
38
        parent::registerPolicies();
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...
39
    }
40
}
41