mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-31 20:50:01 +00:00
Single blank line at eof (#330)
A PHP file without end tag must always end with a single empty line feed.
This commit is contained in:
@@ -88,4 +88,4 @@ class MessageIDParser extends Parser
|
||||
$this->warnings[EmailTooLong::CODE] = new EmailTooLong();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,4 +101,4 @@ class Comment extends PartParser
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,4 +15,4 @@ interface CommentStrategy
|
||||
public function endOfLoopValidations(EmailLexer $lexer) : Result;
|
||||
|
||||
public function getWarnings() : array;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,4 @@ class DomainComment implements CommentStrategy
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,4 @@ class LocalComment implements CommentStrategy
|
||||
{
|
||||
return $this->warnings;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,4 +208,4 @@ class DomainLiteral extends PartParser
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,4 +84,4 @@ class DoubleQuote extends PartParser
|
||||
return new ValidEmail();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,4 +83,4 @@ class FoldingWhiteSpace extends PartParser
|
||||
|
||||
return in_array($this->lexer->token['type'], self::FWS_TYPES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ class IDLeftPart extends LocalPart
|
||||
{
|
||||
return new InvalidEmail(new CommentsInIDRight(), $this->lexer->token['value']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,4 @@ class IDRightPart extends DomainPart
|
||||
}
|
||||
return new ValidEmail();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,4 +162,4 @@ class LocalPart extends PartParser
|
||||
|
||||
return new ValidEmail();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,4 +60,4 @@ abstract class PartParser
|
||||
&&
|
||||
$this->lexer->token['type'] !== EmailLexer::GENERIC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ class InvalidEmail implements Result
|
||||
return $this->reason;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class AtextAfterCFWS implements Reason
|
||||
{
|
||||
return 'ATEXT found after CFWS';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class CharNotAllowed implements Reason
|
||||
{
|
||||
return "Character not allowed";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class CommaInDomain implements Reason
|
||||
{
|
||||
return "Comma ',' is not allowed in domain part";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class CommentsInIDRight implements Reason
|
||||
{
|
||||
return 'Comments are not allowed in IDRight for message-id';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@ abstract class DetailedReason implements Reason
|
||||
{
|
||||
$this->detailedDescription = $details;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class DomainAcceptsNoMail implements Reason
|
||||
{
|
||||
return 'Domain accepts no mail (Null MX, RFC7505)';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,4 @@ class ExceptionFound implements Reason
|
||||
{
|
||||
return $this->exception->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class ExpectingDomainLiteralClose implements Reason
|
||||
{
|
||||
return "Closing bracket ']' for domain literal not found";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class LocalOrReservedDomain implements Reason
|
||||
{
|
||||
return 'Local, mDNS or reserved domain (RFC2606, RFC6762)';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class NoDNSRecord implements Reason
|
||||
{
|
||||
return 'No MX or A DSN record was found for this email';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ interface Reason
|
||||
* Short description of the result, human readable.
|
||||
*/
|
||||
public function description() : string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ class UnOpenedComment implements Reason
|
||||
{
|
||||
return 'Missing opening comment parentheses - https://tools.ietf.org/html/rfc5322#section-3.2.2';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,4 @@ class UnusualElements implements Reason
|
||||
{
|
||||
return 'Unusual element found, wourld render invalid in majority of cases. Element found: ' . $this->element;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ interface Result
|
||||
* Code for user land to act upon.
|
||||
*/
|
||||
public function code() : int;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@ class SpoofEmail extends InvalidEmail
|
||||
$this->reason = new ReasonSpoofEmail();
|
||||
parent::__construct($this->reason, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ class ValidEmail implements Result
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,4 +188,4 @@ class DNSCheckValidation implements EmailValidation
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,4 +25,4 @@ class DNSGetRecordWrapper
|
||||
restore_error_handler();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,4 @@ class DNSRecords
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user