original_string: public function check($uri)
      {
          $url = parse_url($uri);
          if (isset($url['query'])) {
              parse_str($url['query'], $params);
          } else {
              $params = [];
          }
  
          if (empty($params[$this->parameter])) {
              return false;
          }
  
          $hash = $params[$this->parameter];
          unset($params[$this->parameter]);
  
          return $this->computeHash($this->buildUrl($url, $params)) === $hash;
      }
code: public function check($uri)
      {
          $url = parse_url($uri);
          if (isset($url['query'])) {
              parse_str($url['query'], $params);
          } else {
              $params = [];
          }
  
          if (empty($params[$this->parameter])) {
              return false;
          }
  
          $hash = $params[$this->parameter];
          unset($params[$this->parameter]);
  
          return $this->computeHash($this->buildUrl($url, $params)) === $hash;
      }
code_tokens: public function check ( $ uri ) { $ url = parse_url ( $ uri ) ; if ( isset ( $ url [ 'query' ] ) ) { parse_str ( $ url [ 'query' ] , $ params ) ; } else { $ params = [ ] ; } if ( empty ( $ params [ $ this -> parameter ] ) ) { return false ; } $ hash = $ params [ $ this -> parameter ] ; unset ( $ params [ $ this -> parameter ] ) ; return $ this -> computeHash ( $ this -> buildUrl ( $ url , $ params ) ) === $ hash ; }
docstring: Checks that a URI contains the correct hash.
  
  @param string $uri A signed URI
  
  @return bool True if the URI is signed correctly, false otherwise
docstring_tokens: Checks that a URI contains the correct hash .