| Total Complexity | 6 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 93.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class UrlHelper |
||
| 7 | { |
||
| 8 | 5 | public static function parseQueryTokenFromResponse(Response $response, string $queryKey = 'token'): ?string |
|
| 17 | } |
||
| 18 | |||
| 19 | 6 | public static function parseQueryTokenFromUrl(string $url, string $queryKey = 'token'): ?string |
|
| 20 | { |
||
| 21 | 6 | $queryString = parse_url($url, PHP_URL_QUERY); |
|
| 22 | |||
| 23 | 6 | if (! $queryString) { |
|
| 24 | 1 | return null; |
|
| 25 | } |
||
| 26 | |||
| 27 | 5 | return self::parseTokenFromQueryString($queryString, $queryKey); |
|
| 28 | } |
||
| 29 | |||
| 30 | 13 | public static function parseTokenFromQueryString(string $queryString, string $queryKey = 'token'): null|string|array |
|
| 39 | } |
||
| 40 | } |
||
| 41 |