@@ -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(); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | if ($this->lexer->token['type'] === EmailLexer::INVALID || |
258 | - $this->lexer->token['type'] === EmailLexer::C_DEL || |
|
258 | + $this->lexer->token['type'] === EmailLexer::C_DEL || |
|
259 | 259 | $this->lexer->token['type'] === EmailLexer::S_LF |
260 | 260 | ) { |
261 | 261 | $this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT(); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | */ |
320 | 320 | protected function checkIPV4Tag($addressLiteral) |
321 | 321 | { |
322 | - $matchesIP = array(); |
|
322 | + $matchesIP = array(); |
|
323 | 323 | |
324 | 324 | // Extract IPv4 part from the end of the address-literal (if there is one) |
325 | 325 | if (preg_match( |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | return false; |
335 | 335 | } |
336 | 336 | // Convert IPv4 part to IPv6 format for further testing |
337 | - $addressLiteral = substr($addressLiteral, 0, (int) $index) . '0:0'; |
|
337 | + $addressLiteral = substr($addressLiteral, 0, (int) $index).'0:0'; |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | return $addressLiteral; |