| Total Complexity | 13 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class WhichPortal |
||
| 9 | { |
||
| 10 | |||
| 11 | public function home() |
||
|
1 ignored issue
–
show
|
|||
| 12 | { |
||
| 13 | if ($this->isAdminPortal()) { |
||
| 14 | return 'admin'; |
||
| 15 | } elseif ($this->isManagerPortal()) { |
||
| 16 | return route('manager.home'); |
||
| 17 | } |
||
| 18 | return route('home'); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function isApplicantPortal() |
||
|
1 ignored issue
–
show
|
|||
| 22 | { |
||
| 23 | return !$this->isManagerPortal() && !$this->isAdminPortal(); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function isManagerPortal() |
||
|
1 ignored issue
–
show
|
|||
| 27 | { |
||
| 28 | $url = URL::current(); |
||
| 29 | return $this->urlIsManagerPortal($url); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function isAdminPortal() |
||
|
1 ignored issue
–
show
|
|||
| 33 | { |
||
| 34 | $url = URL::current(); |
||
| 35 | return $this->urlIsAdminPortal($url); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function urlIsManagerPortal($url): bool |
||
| 44 | } |
||
| 45 | |||
| 46 | public function urlIsAdminPortal($url): bool |
||
|
1 ignored issue
–
show
|
|||
| 47 | { |
||
| 52 | } |
||
| 53 | |||
| 54 | public function prefixRoute($routeName): string |
||
| 66 |