original_string: protected function _validateEmail($email, $context)
      {
          if ($this->_emailPattern === null) {
              if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
                  return;
              }
          } elseif (preg_match($this->_emailPattern, $email)) {
              return;
          }
  
          $context = ltrim($context, '_');
          if ($email == '') {
              throw new InvalidArgumentException(sprintf('The email set for "%s" is empty.', $context));
          }
          throw new InvalidArgumentException(sprintf('Invalid email set for "%s". You passed "%s".', $context, $email));
      }
code: protected function _validateEmail($email, $context)
      {
          if ($this->_emailPattern === null) {
              if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
                  return;
              }
          } elseif (preg_match($this->_emailPattern, $email)) {
              return;
          }
  
          $context = ltrim($context, '_');
          if ($email == '') {
              throw new InvalidArgumentException(sprintf('The email set for "%s" is empty.', $context));
          }
          throw new InvalidArgumentException(sprintf('Invalid email set for "%s". You passed "%s".', $context, $email));
      }
code_tokens: protected function _validateEmail ( $ email , $ context ) { if ( $ this -> _emailPattern === null ) { if ( filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ) { return ; } } elseif ( preg_match ( $ this -> _emailPattern , $ email ) ) { return ; } $ context = ltrim ( $ context , '_' ) ; if ( $ email == '' ) { throw new InvalidArgumentException ( sprintf ( 'The email set for "%s" is empty.' , $ context ) ) ; } throw new InvalidArgumentException ( sprintf ( 'Invalid email set for "%s". You passed "%s".' , $ context , $ email ) ) ; }
docstring: Validate email address
  
  @param string $email Email address to validate
  @param string $context Which property was set
  @return void
  @throws \InvalidArgumentException If email address does not validate
docstring_tokens: Validate email address