| Conditions | 1 |
| Paths | 1 |
| Total Lines | 6 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function urlIsAdminPortal($url): bool |
||
|
1 ignored issue
–
show
|
|||
| 37 | { |
||
| 38 | $baseUrl = config('app.url'); |
||
| 39 | $adminPrefix = config('backpack.base.route_prefix', 'admin'); |
||
| 40 | $adminPattern = "#^$baseUrl/(\w+/)?$adminPrefix(/.*)?$#"; |
||
| 41 | return preg_match($adminPattern, $url); |
||
| 42 | } |
||
| 44 |