1 | <?php namespace Arcanesoft\Blog\Providers; |
||
13 | class AuthorizationServiceProvider extends ServiceProvider |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Properties |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** |
||
20 | * The policy mappings for the application. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $policies = [ |
||
25 | // |
||
26 | ]; |
||
27 | |||
28 | /* ------------------------------------------------------------------------------------------------ |
||
29 | | Main Functions |
||
30 | | ------------------------------------------------------------------------------------------------ |
||
31 | */ |
||
32 | /** |
||
33 | * Register any application authentication / authorization services. |
||
34 | * |
||
35 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
36 | */ |
||
37 | 8 | public function boot(GateContract $gate) |
|
46 | |||
47 | /* ------------------------------------------------------------------------------------------------ |
||
48 | | Policies |
||
49 | | ------------------------------------------------------------------------------------------------ |
||
50 | */ |
||
51 | /** |
||
52 | * Register posts authorizations. |
||
53 | * |
||
54 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
55 | */ |
||
56 | 8 | private function registerPostsPolicies(GateContract $gate) |
|
63 | |||
64 | /** |
||
65 | * Register categories authorizations. |
||
66 | * |
||
67 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
68 | */ |
||
69 | 8 | private function registerCategoriesPolicies(GateContract $gate) |
|
76 | |||
77 | /** |
||
78 | * Register tags authorizations. |
||
79 | * |
||
80 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
81 | */ |
||
82 | 8 | private function registerTagsPolicies(GateContract $gate) |
|
89 | |||
90 | /** |
||
91 | * Register other authorizations for blog module. |
||
92 | * |
||
93 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
94 | */ |
||
95 | 8 | private function registerOtherPolicies(GateContract $gate) |
|
99 | } |
||
100 |
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:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.