original_string: public function isSpam(Request $request)
      {
          $spammers = $this->getSpammerListFromCache();
  
          $referrerUrl = $request->getParam('urlref');
  
          foreach ($spammers as $spammerHost) {
              if (stripos($referrerUrl, $spammerHost) !== false) {
                  Common::printDebug('Referrer URL is a known spam: ' . $spammerHost);
                  return true;
              }
          }
  
          return false;
      }
code: public function isSpam(Request $request)
      {
          $spammers = $this->getSpammerListFromCache();
  
          $referrerUrl = $request->getParam('urlref');
  
          foreach ($spammers as $spammerHost) {
              if (stripos($referrerUrl, $spammerHost) !== false) {
                  Common::printDebug('Referrer URL is a known spam: ' . $spammerHost);
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function isSpam ( Request $ request ) { $ spammers = $ this -> getSpammerListFromCache ( ) ; $ referrerUrl = $ request -> getParam ( 'urlref' ) ; foreach ( $ spammers as $ spammerHost ) { if ( stripos ( $ referrerUrl , $ spammerHost ) !== false ) { Common :: printDebug ( 'Referrer URL is a known spam: ' . $ spammerHost ) ; return true ; } } return false ; }
docstring: Check if the request is from a known spammer host.
  
  @param Request $request
  @return bool
docstring_tokens: Check if the request is from a known spammer host .