These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php namespace Arcanesoft\Foundation\Policies; |
||
2 | |||
3 | use Arcanesoft\Contracts\Auth\Models\User; |
||
4 | |||
5 | /** |
||
6 | * Class Policy |
||
7 | * |
||
8 | * @package Arcanesoft\Foundation\Policies |
||
9 | * @author ARCANEDEV <[email protected]> |
||
10 | */ |
||
11 | abstract class Policy |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Main Functions |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * @param \Arcanesoft\Contracts\Auth\Models\User $user |
||
19 | * @param mixed $ability |
||
20 | * |
||
21 | * @return bool |
||
22 | */ |
||
23 | public function before(User $user, $ability) |
||
0 ignored issues
–
show
|
|||
24 | { |
||
25 | if ($user->isAdmin()) return true; |
||
26 | } |
||
27 | } |
||
28 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.