public function getPathOnly(): string
    {
        $requestUri = $this->getPath();

        // Determine if the request uri has any query parameters
        if (false !== $queryPosition = strpos($requestUri, '?')) {
            // If so get the substring of the uri from start until the query param position
            $requestUri = substr($requestUri, 0, $queryPosition);
        }

        return $requestUri;
    }