original_string: public function validateForbiddenTLD($email, $specifiedTLDs = array()) {
  
          $forbiddenTLDs = $this->getTheForbiddenTLDs($specifiedTLDs);
  
          // if no TLD's specified in the parameters; and, no TLD's specified in the config,
          // then deem the validation as kosher
          if (empty($forbiddenTLDs)) return true;
  
          // initialize var
          $validation = true;
  
          foreach ($forbiddenTLDs as $forbiddenTLD)
          {
              $lengthOfForbiddenTLD = $this->lengthForbiddenTLD($forbiddenTLD);
              $lastCharactersOfEmail = $this->lastCharactersOfEmail($email, $lengthOfForbiddenTLD);
  
              // validate
              if ($this->compareEmailWithForbiddenTLD($lastCharactersOfEmail, $forbiddenTLD) )
              {
                  $validation = false;
              }
          }
  
          return $validation;
      }
code: public function validateForbiddenTLD($email, $specifiedTLDs = array()) {
  
          $forbiddenTLDs = $this->getTheForbiddenTLDs($specifiedTLDs);
  
          // if no TLD's specified in the parameters; and, no TLD's specified in the config,
          // then deem the validation as kosher
          if (empty($forbiddenTLDs)) return true;
  
          // initialize var
          $validation = true;
  
          foreach ($forbiddenTLDs as $forbiddenTLD)
          {
              $lengthOfForbiddenTLD = $this->lengthForbiddenTLD($forbiddenTLD);
              $lastCharactersOfEmail = $this->lastCharactersOfEmail($email, $lengthOfForbiddenTLD);
  
              // validate
              if ($this->compareEmailWithForbiddenTLD($lastCharactersOfEmail, $forbiddenTLD) )
              {
                  $validation = false;
              }
          }
  
          return $validation;
      }
code_tokens: public function validateForbiddenTLD ( $ email , $ specifiedTLDs = array ( ) ) { $ forbiddenTLDs = $ this -> getTheForbiddenTLDs ( $ specifiedTLDs ) ; // if no TLD's specified in the parameters; and, no TLD's specified in the config, // then deem the validation as kosher if ( empty ( $ forbiddenTLDs ) ) return true ; // initialize var $ validation = true ; foreach ( $ forbiddenTLDs as $ forbiddenTLD ) { $ lengthOfForbiddenTLD = $ this -> lengthForbiddenTLD ( $ forbiddenTLD ) ; $ lastCharactersOfEmail = $ this -> lastCharactersOfEmail ( $ email , $ lengthOfForbiddenTLD ) ; // validate if ( $ this -> compareEmailWithForbiddenTLD ( $ lastCharactersOfEmail , $ forbiddenTLD ) ) { $ validation = false ; } } return $ validation ; }
docstring: Validate Top Level Domains
  
  @param  string $email
  @param  array  $specifiedTLDs  So unit test can specify its own array of forbidden TLDs
  @return bool
docstring_tokens: Validate Top Level Domains