original_string: public function create(Environment $environment)
      {
          $scheme = $environment->getRequestScheme();
          $host   = $environment->getHost();
          $port   = $environment->getPort();
          $query  = $environment->getQueryString();
          $user   = $environment->getAuthUser();
          $pass   = $environment->getAuthPassword();
  
          // parse_url() requires a full URL - but only URL path is need it here.
          $path = parse_url('http://example.com' . $environment->getRequestUri(), PHP_URL_PATH);
          if ($path === false) {
              throw new InvalidArgumentException('Uri path must be a string');
          }
  
          return new Uri($scheme, $host, $port, $path, $query, '', $user, $pass);
      }
code: public function create(Environment $environment)
      {
          $scheme = $environment->getRequestScheme();
          $host   = $environment->getHost();
          $port   = $environment->getPort();
          $query  = $environment->getQueryString();
          $user   = $environment->getAuthUser();
          $pass   = $environment->getAuthPassword();
  
          // parse_url() requires a full URL - but only URL path is need it here.
          $path = parse_url('http://example.com' . $environment->getRequestUri(), PHP_URL_PATH);
          if ($path === false) {
              throw new InvalidArgumentException('Uri path must be a string');
          }
  
          return new Uri($scheme, $host, $port, $path, $query, '', $user, $pass);
      }
code_tokens: public function create ( Environment $ environment ) { $ scheme = $ environment -> getRequestScheme ( ) ; $ host = $ environment -> getHost ( ) ; $ port = $ environment -> getPort ( ) ; $ query = $ environment -> getQueryString ( ) ; $ user = $ environment -> getAuthUser ( ) ; $ pass = $ environment -> getAuthPassword ( ) ; // parse_url() requires a full URL - but only URL path is need it here. $ path = parse_url ( 'http://example.com' . $ environment -> getRequestUri ( ) , PHP_URL_PATH ) ; if ( $ path === false ) { throw new InvalidArgumentException ( 'Uri path must be a string' ) ; } return new Uri ( $ scheme , $ host , $ port , $ path , $ query , '' , $ user , $ pass ) ; }
docstring: Create instances of Uri object from instance of Environment object
  
  @param Environment $environment environment data
  
  @return Uri Instance of Uri object created from environment
docstring_tokens: Create instances of Uri object from instance of Environment object