removed redundant returns

This commit is contained in:
Mark Magyar
2023-05-18 00:33:13 +02:00
parent 29a51509dc
commit b698d4adbe
+1 -7
View File
@@ -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();
}
}