| Total Complexity | 6 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class EquipmentCategoryPolicy |
||
| 12 | { |
||
| 13 | use HandlesAuthorization; |
||
| 14 | |||
| 15 | /* |
||
| 16 | * Allow anyone with "Manage Equipment" permission |
||
| 17 | */ |
||
| 18 | 13 | public function before(User $user, $method) |
|
| 30 | } |
||
| 31 | 6 | } |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Determine whether the user can create models. |
||
| 35 | * |
||
| 36 | * @param \App\Models\User $user |
||
| 37 | * @return mixed |
||
| 38 | */ |
||
| 39 | 4 | public function create(User $user) |
|
|
|
|||
| 40 | { |
||
| 41 | 4 | return false; |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Determine whether the user can update the model. |
||
| 46 | * |
||
| 47 | * @param \App\Models\User $user |
||
| 48 | * @param \App\Models\EquipmentCategory $equipmentCategory |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | 1 | public function update(User $user, EquipmentCategory $equipmentCategory) |
|
| 52 | { |
||
| 53 | 1 | return false; |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Determine whether the user can delete the model. |
||
| 58 | * |
||
| 59 | * @param \App\Models\User $user |
||
| 60 | * @param \App\Models\EquipmentCategory $equipmentCategory |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | 1 | public function delete(User $user, EquipmentCategory $equipmentCategory) |
|
| 66 | } |
||
| 67 | } |
||
| 68 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.