| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class RequestHelper |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param RequestInterface $request |
||
| 16 | * @return array |
||
| 17 | */ |
||
| 18 | 17 | public static function getHostAndPath(RequestInterface $request) : array |
|
| 19 | { |
||
| 20 | 17 | $uri = $request->getUri(); |
|
| 21 | |||
| 22 | return [ |
||
| 23 | 17 | $uri->getScheme() . '://' . $uri->getHost(), |
|
| 24 | 17 | $uri->getPath() |
|
| 25 | ]; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param RequestInterface $request |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | 18 | public static function getStorageKey(RequestInterface $request) : string |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $method |
||
| 47 | * @param string $params |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | 18 | private static function _getMethodAndParams(string $method, string $params) : string |
|
| 53 | } |
||
| 54 | } |