Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class UrlHelper { |
||
12 | |||
13 | /** |
||
14 | * Array of all the query parameters for the current request. |
||
15 | * |
||
16 | * @return array |
||
17 | * @throws \RuntimeException |
||
18 | */ |
||
19 | 12 | public function queryParameters() : array |
|
20 | { |
||
21 | 12 | $queryString = \request()->getQueryString(); |
|
22 | |||
23 | 12 | return empty($queryString) ? [] : $this->_extractQueryParameters($queryString); |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @param string $queryString |
||
28 | * @return array |
||
29 | * @throws \RuntimeException |
||
30 | */ |
||
31 | 2 | private function _extractQueryParameters(string $queryString) : array |
|
46 | } |
||
47 | } |