original_string: public function listed(string $url, $returnType = false)
      {
          if (empty($this->apiKey)) {
              throw new Exception('A Google Safebrowsing API key has not been specified');
          }
  
          // Retrieve the result from SafeBrowsing
          $result = $this->getSafebrowsingResult($url);
  
          // Check for exististance of the supplied URL in any matches
          if (is_object($result) and isset($result->matches)) {
              foreach ($result->matches as $match) {
                  if ($match->threat->url == $url) {
                      // Return the Threat Type if requested,
                      // otherwise return true
                      if ($returnType) {
                          return $match->threatType;
                      }
                      
                      return true;
                  }
              }
          }
  
          return false;
      }
code: public function listed(string $url, $returnType = false)
      {
          if (empty($this->apiKey)) {
              throw new Exception('A Google Safebrowsing API key has not been specified');
          }
  
          // Retrieve the result from SafeBrowsing
          $result = $this->getSafebrowsingResult($url);
  
          // Check for exististance of the supplied URL in any matches
          if (is_object($result) and isset($result->matches)) {
              foreach ($result->matches as $match) {
                  if ($match->threat->url == $url) {
                      // Return the Threat Type if requested,
                      // otherwise return true
                      if ($returnType) {
                          return $match->threatType;
                      }
                      
                      return true;
                  }
              }
          }
  
          return false;
      }
code_tokens: public function listed ( string $ url , $ returnType = false ) { if ( empty ( $ this -> apiKey ) ) { throw new Exception ( 'A Google Safebrowsing API key has not been specified' ) ; } // Retrieve the result from SafeBrowsing $ result = $ this -> getSafebrowsingResult ( $ url ) ; // Check for exististance of the supplied URL in any matches if ( is_object ( $ result ) and isset ( $ result -> matches ) ) { foreach ( $ result -> matches as $ match ) { if ( $ match -> threat -> url == $ url ) { // Return the Threat Type if requested, // otherwise return true if ( $ returnType ) { return $ match -> threatType ; } return true ; } } } return false ; }
docstring: Return listed status from Google Safebrowsing. Returns true on listed status
  @param  string $url
  @param  bool   $returnType
  @return bool|string
docstring_tokens: Return listed status from Google Safebrowsing . Returns true on listed status