src/Request.php
protected function urlToParameters($url)
    {
        $urlParameters = [];
        $url = parse_url($url, PHP_URL_PATH);
        $urlParts = explode('/', $url);
        reset($urlParts); // Note, the first entry will always be blank
        $key = next($urlParts);
        while (($value = next($urlParts)) !== false) {
            $urlParameters[$key] = $value;
            $key = $value;
        }
        return $urlParameters;
    }
protected function urlToParameters($url)
    {
        $urlParameters = [];
        $url = parse_url($url, PHP_URL_PATH);
        $urlParts = explode('/', $url);
        reset($urlParts); // Note, the first entry will always be blank
        $key = next($urlParts);
        while (($value = next($urlParts)) !== false) {
            $urlParameters[$key] = $value;
            $key = $value;
        }
        return $urlParameters;
    }
Turns a url string into an array of parameters.

This can be a little bit confusing but it allows people to create
pretty uri's for an API. This array simply parametrises the uri
by assuming each slug is the key for the following one.

@example 'here/is/an/example' => ['here' => 'is', 'is' => 'an', 'an' => 'example']

@param string $url
@return array
@SuppressWarnings(PHPMD.Superglobals)