| Total Complexity | 7 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class RolePolicy |
||
| 10 | { |
||
| 11 | use HandlesAuthorization; |
||
| 12 | |||
| 13 | public function before($user) |
||
| 14 | { |
||
| 15 | if ($user->isSuperUser()) { |
||
| 16 | return true; |
||
| 17 | } |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Determine whether the user can view the listing of Abilities. |
||
| 22 | * |
||
| 23 | * @param \App\User $user |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | public function index(User $user) |
||
| 27 | { |
||
| 28 | return $user->hasRole('rakshak'); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Determine whether the user can view the role. |
||
| 33 | * |
||
| 34 | * @param \App\User $user |
||
| 35 | * @param \Thinkstudeo\Rakshak\Role $role |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public function view(User $user, Role $role) |
||
| 39 | { |
||
| 40 | return $user->hasRole('rakshak'); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Determine whether the user can create roles. |
||
| 45 | * |
||
| 46 | * @param \App\User $user |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | public function create(User $user) |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Determine whether the user can update the role. |
||
| 56 | * |
||
| 57 | * @param \App\User $user |
||
| 58 | * @param \Thinkstudeo\Rakshak\Role $role |
||
| 59 | * @return mixed |
||
| 60 | */ |
||
| 61 | public function update(User $user, Role $role) |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Determine whether the user can delete the role. |
||
| 68 | * |
||
| 69 | * @param \App\User $user |
||
| 70 | * @param \Thinkstudeo\Rakshak\Role $role |
||
| 71 | * @return mixed |
||
| 72 | */ |
||
| 73 | public function delete(User $user, Role $role) |
||
| 76 | } |
||
| 77 | } |
||
| 78 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths