| Total Complexity | 10 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 42.86% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class TournamentPolicy |
||
| 12 | { |
||
| 13 | use HandlesAuthorization; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Create a new policy instance. |
||
| 17 | * @param User $user |
||
| 18 | * @param $ability |
||
| 19 | * @return bool |
||
| 20 | */ |
||
| 21 | 10 | public function before(User $user, $ability) |
|
| 27 | } |
||
| 28 | |||
| 29 | // You can create a user if you are not a simple user |
||
| 30 | public function create(User $user) |
||
| 31 | { |
||
| 32 | |||
| 33 | return true; |
||
| 34 | } |
||
| 35 | |||
| 36 | |||
| 37 | // You can store a user if you are not a simple user |
||
| 38 | public function store(User $user, Tournament $tournament) |
||
| 39 | { |
||
| 40 | return true; |
||
| 41 | } |
||
| 42 | |||
| 43 | |||
| 44 | 9 | public function edit(User $user, Tournament $tournament) |
|
| 47 | |||
| 48 | } |
||
| 49 | |||
| 50 | public function update(User $user, Tournament $tournament) |
||
| 53 | } |
||
| 54 | |||
| 55 | public function destroy(User $user, Tournament $tournament) |
||
| 58 | } |
||
| 59 | |||
| 62 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.