| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Arcanesoft\Foundation\Providers; |
||
| 25 | 12 | public function boot(GateContract $gate) |
|
| 26 | { |
||
| 27 | 12 | $this->registerPolicies($gate); |
|
| 28 | |||
| 29 | /** @var \Illuminate\Auth\Access\Gate $gate */ |
||
| 30 | 12 | $gate->before(function (User $user, $ability) { |
|
|
|
|||
| 31 | return $user->isAdmin() ? true : null; |
||
| 32 | 12 | }); |
|
| 33 | |||
| 34 | 12 | $this->registerLogViewerPolicies($gate); |
|
| 35 | 12 | } |
|
| 36 | |||
| 51 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.