| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function run(User $user) |
||
| 11 | { |
||
| 12 | $userRole = $user->role_id; |
||
| 13 | |||
| 14 | switch($userRole) |
||
| 15 | { |
||
| 16 | case 1: |
||
| 17 | $roles = UserRoles::all(); |
||
| 18 | break; |
||
| 19 | case 2: |
||
| 20 | $roles = UserRoles::where('role_id', '>=', 2)->get(); |
||
| 21 | break; |
||
| 22 | default: |
||
| 23 | $roles = UserRoles::where('role_id', '>', 2)->get(); |
||
| 24 | } |
||
| 25 | |||
| 26 | return $roles; |
||
| 27 | } |
||
| 29 |