@@ -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; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function __construct($namespace, $path) |
29 | 29 | { |
30 | 30 | $this->namespace = ltrim($namespace, '\\'); |
31 | - $this->path = rtrim($path, '/\\') . DIRECTORY_SEPARATOR; |
|
31 | + $this->path = rtrim($path, '/\\').DIRECTORY_SEPARATOR; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | if (strpos($class, $this->namespace) === 0) { |
45 | 45 | $nsparts = explode('\\', $class); |
46 | 46 | $class = array_pop($nsparts); |
47 | - $path = $this->path . 'swiftmailer/egulias/email-validator/EmailValidator/'; |
|
48 | - $max=count($nsparts); |
|
49 | - for ($i=2; $i<$max;$i++) { |
|
47 | + $path = $this->path.'swiftmailer/egulias/email-validator/EmailValidator/'; |
|
48 | + $max = count($nsparts); |
|
49 | + for ($i = 2; $i < $max; $i++) { |
|
50 | 50 | $path .= $nsparts[$i].'/'; |
51 | 51 | } |
52 | 52 | $nsparts = array(); |
53 | - $path .= str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; |
|
53 | + $path .= str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; |
|
54 | 54 | if (file_exists($path)) { |
55 | 55 | require $path; |
56 | 56 | return true; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | { |
247 | 247 | static $regex; |
248 | 248 | |
249 | - if ( ! isset($regex)) { |
|
249 | + if (!isset($regex)) { |
|
250 | 250 | $regex = sprintf( |
251 | 251 | '/(%s)|%s/%s', |
252 | 252 | implode(')|(', $this->getCatchablePatterns()), |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | foreach ($constants as $name => $value) { |
292 | 292 | if ($value === $token) { |
293 | - return $className . '::' . $name; |
|
293 | + return $className.'::'.$name; |
|
294 | 294 | } |
295 | 295 | } |
296 | 296 |