1 | <?php |
||
2 | |||
3 | namespace TaskManager\Providers; |
||
4 | |||
5 | use Illuminate\Support\Facades\Gate; |
||
6 | use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; |
||
7 | use Illuminate\Contracts\Auth\Access\Gate as GateContract; |
||
8 | |||
9 | class AuthServiceProvider extends ServiceProvider |
||
10 | { |
||
11 | /** |
||
12 | * The policy mappings for the application. |
||
13 | * |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $policies = [ |
||
17 | '\TaskManager\Tasks' => '\TaskManager\Policies\TasksPolicy' |
||
18 | ]; |
||
19 | |||
20 | |||
21 | /** |
||
22 | * Register any authentication / authorization services. |
||
23 | * |
||
24 | * @return void |
||
25 | */ |
||
26 | public function boot(GateContract $gate) |
||
0 ignored issues
–
show
|
|||
27 | { |
||
28 | $this->registerPolicies(); |
||
29 | Gate::resource('tasks', '\TaskManager\Policies\TasksPolicy'); |
||
30 | //$gate->define('task-delete','\TaskManager\Policies\TasksPolicy@delete'); |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
89% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
31 | |||
32 | |||
33 | // |
||
34 | } |
||
35 | } |
||
36 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.