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