class LocalComment
Hierarchy
- class \Egulias\EmailValidator\Parser\CommentStrategy\LocalComment implements \Egulias\EmailValidator\Parser\CommentStrategy\CommentStrategy
Expanded class hierarchy of LocalComment
1 file declares its use of LocalComment
- LocalPart.php in vendor/
egulias/ email-validator/ src/ Parser/ LocalPart.php
File
-
vendor/
egulias/ email-validator/ src/ Parser/ CommentStrategy/ LocalComment.php, line 12
Namespace
Egulias\EmailValidator\Parser\CommentStrategyView source
class LocalComment implements CommentStrategy {
/**
* @var array
*/
private $warnings = [];
public function exitCondition(EmailLexer $lexer, int $openedParenthesis) : bool {
return !$lexer->isNextToken(EmailLexer::S_AT);
}
public function endOfLoopValidations(EmailLexer $lexer) : Result {
if (!$lexer->isNextToken(EmailLexer::S_AT)) {
return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->current->value);
}
$this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();
return new ValidEmail();
}
public function getWarnings() : array {
return $this->warnings;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
LocalComment::$warnings | private | property | ||
LocalComment::endOfLoopValidations | public | function | Overrides CommentStrategy::endOfLoopValidations | |
LocalComment::exitCondition | public | function | Return "true" to continue, "false" to exit | Overrides CommentStrategy::exitCondition |
LocalComment::getWarnings | public | function | Overrides CommentStrategy::getWarnings |