src/Request/Serializer.php
private static function createUriFromRequestTarget($requestTarget)
    {
        if (preg_match('#^https?://#', $requestTarget)) {
            return new Uri($requestTarget);
        }

        if (preg_match('#^(\*|[^/])#', $requestTarget)) {
            return new Uri();
        }

        return new Uri($requestTarget);
    }
private static function createUriFromRequestTarget($requestTarget)
    {
        if (preg_match('#^https?://#', $requestTarget)) {
            return new Uri($requestTarget);
        }

        if (preg_match('#^(\*|[^/])#', $requestTarget)) {
            return new Uri();
        }

        return new Uri($requestTarget);
    }
private static function createUriFromRequestTarget ( $ requestTarget ) { if ( preg_match ( '#^https?://#' , $ requestTarget ) ) { return new Uri ( $ requestTarget ) ; } if ( preg_match ( '#^(\*|[^/])#' , $ requestTarget ) ) { return new Uri ( ) ; } return new Uri ( $ requestTarget ) ; }
Create and return a Uri instance based on the provided request target.

If the request target is of authority or asterisk form, an empty Uri
instance is returned; otherwise, the value is used to create and return
a new Uri instance.

@param string $requestTarget
@return Uri
Create and return a Uri instance based on the provided request target .