mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-12 11:06:31 +00:00
removed redundant returns
This commit is contained in:
@@ -142,9 +142,7 @@ class LocalPart extends PartParser
|
||||
$commentParser = new Comment($this->lexer, new LocalComment());
|
||||
$result = $commentParser->parse();
|
||||
$this->warnings = [...$this->warnings, ...$commentParser->getWarnings()];
|
||||
if ($result->isInvalid()) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -159,10 +157,6 @@ class LocalPart extends PartParser
|
||||
return new InvalidEmail(new ExpectingATEXT('Found ATOM after escaping'), $this->lexer->current->value);
|
||||
}
|
||||
|
||||
if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) {
|
||||
return new ValidEmail();
|
||||
}
|
||||
|
||||
return new ValidEmail();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user