@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | require __DIR__.'/classes/Swift.php'; |
| 12 | 12 | |
| 13 | -Swift::registerAutoload(function () { |
|
| 13 | +Swift::registerAutoload(function() { |
|
| 14 | 14 | // Load in dependency maps |
| 15 | 15 | require __DIR__.'/dependency_maps/cache_deps.php'; |
| 16 | 16 | require __DIR__.'/dependency_maps/mime_deps.php'; |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | namespace Egulias; |
| 8 | 8 | |
| 9 | -require_once __DIR__ . '/egulias/email-validator/AutoLoader.php'; |
|
| 9 | +require_once __DIR__.'/egulias/email-validator/AutoLoader.php'; |
|
| 10 | 10 | |
| 11 | 11 | $autoloader = new EguliasAutoLoader(__NAMESPACE__, dirname(__DIR__)); |
| 12 | 12 | |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | */ |
| 131 | 131 | protected function addLongEmailWarning($localPart, $parsedDomainPart) |
| 132 | 132 | { |
| 133 | - if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) { |
|
| 133 | + if (strlen($localPart.'@'.$parsedDomainPart) > self::EMAIL_MAX_LENGTH) { |
|
| 134 | 134 | $this->warnings[EmailTooLong::CODE] = new EmailTooLong(); |
| 135 | 135 | } |
| 136 | 136 | } |
@@ -10,6 +10,6 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function __construct() |
| 12 | 12 | { |
| 13 | - $this->message = 'Email is too long, exceeds ' . EmailParser::EMAIL_MAX_LENGTH; |
|
| 13 | + $this->message = 'Email is too long, exceeds '.EmailParser::EMAIL_MAX_LENGTH; |
|
| 14 | 14 | } |
| 15 | 15 | } |
@@ -42,6 +42,6 @@ |
||
| 42 | 42 | |
| 43 | 43 | public function __toString() |
| 44 | 44 | { |
| 45 | - return $this->message() . " rfc: " . $this->rfcNumber . "interal code: " . static::CODE; |
|
| 45 | + return $this->message()." rfc: ".$this->rfcNumber."interal code: ".static::CODE; |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $search->skipUntil($type); |
| 152 | 152 | |
| 153 | 153 | if (!$search->lookahead) { |
| 154 | - throw new \UnexpectedValueException($type . ' not found'); |
|
| 154 | + throw new \UnexpectedValueException($type.' not found'); |
|
| 155 | 155 | } |
| 156 | 156 | return true; |
| 157 | 157 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | { |
| 190 | 190 | return array( |
| 191 | 191 | '[a-zA-Z_]+[46]?', //ASCII and domain literal |
| 192 | - '[^\x00-\x7F]', //UTF-8 |
|
| 192 | + '[^\x00-\x7F]', //UTF-8 |
|
| 193 | 193 | '[0-9]+', |
| 194 | 194 | '\r\n', |
| 195 | 195 | '::', |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | { |
| 100 | 100 | $variant = INTL_IDNA_VARIANT_UTS46; |
| 101 | 101 | |
| 102 | - $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.') . '.'; |
|
| 102 | + $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.').'.'; |
|
| 103 | 103 | |
| 104 | 104 | return $this->validateDnsRecords($host); |
| 105 | 105 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | { |
| 28 | 28 | $this->parser = new EmailParser($emailLexer); |
| 29 | 29 | try { |
| 30 | - $this->parser->parse((string)$email); |
|
| 30 | + $this->parser->parse((string) $email); |
|
| 31 | 31 | } catch (InvalidEmail $invalid) { |
| 32 | 32 | $this->error = $invalid; |
| 33 | 33 | return false; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | throw new CRNoLF(); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { |
|
| 123 | + if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { |
|
| 124 | 124 | throw new AtextAfterCFWS(); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | throw new ExpectingCTEXT(); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { |
|
| 131 | + if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { |
|
| 132 | 132 | $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); |
| 133 | 133 | } else { |
| 134 | 134 | $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); |