@@ -51,23 +51,23 @@ discard block |
||
51 | 51 | $prefix = 'Swift_CharacterReader_'; |
52 | 52 | |
53 | 53 | $singleByte = array( |
54 | - 'class' => $prefix . 'GenericFixedWidthReader', |
|
54 | + 'class' => $prefix.'GenericFixedWidthReader', |
|
55 | 55 | 'constructor' => array(1), |
56 | 56 | ); |
57 | 57 | |
58 | 58 | $doubleByte = array( |
59 | - 'class' => $prefix . 'GenericFixedWidthReader', |
|
59 | + 'class' => $prefix.'GenericFixedWidthReader', |
|
60 | 60 | 'constructor' => array(2), |
61 | 61 | ); |
62 | 62 | |
63 | 63 | $fourBytes = array( |
64 | - 'class' => $prefix . 'GenericFixedWidthReader', |
|
64 | + 'class' => $prefix.'GenericFixedWidthReader', |
|
65 | 65 | 'constructor' => array(4), |
66 | 66 | ); |
67 | 67 | |
68 | 68 | // UTF-8 |
69 | 69 | self::$_map['utf-?8'] = array( |
70 | - 'class' => $prefix . 'Utf8Reader', |
|
70 | + 'class' => $prefix.'Utf8Reader', |
|
71 | 71 | 'constructor' => array(), |
72 | 72 | ); |
73 | 73 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $charset = Swift::strtolowerWithStaticCache(trim($charset)); |
107 | 107 | |
108 | 108 | foreach (self::$_map as $pattern => $spec) { |
109 | - $re = '/^' . $pattern . '$/D'; |
|
109 | + $re = '/^'.$pattern.'$/D'; |
|
110 | 110 | if (preg_match($re, $charset)) { |
111 | 111 | if (!array_key_exists($pattern, self::$_loaded)) { |
112 | 112 | $reflector = new ReflectionClass($spec['class']); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function setNameAddresses($mailboxes) |
111 | 111 | { |
112 | - $this->_mailboxes = $this->normalizeMailboxes((array)$mailboxes); |
|
112 | + $this->_mailboxes = $this->normalizeMailboxes((array) $mailboxes); |
|
113 | 113 | $this->setCachedValue(null); //Clear any cached value |
114 | 114 | } |
115 | 115 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function setAddresses($addresses) |
196 | 196 | { |
197 | - $this->setNameAddresses(array_values((array)$addresses)); |
|
197 | + $this->setNameAddresses(array_values((array) $addresses)); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | public function removeAddresses($addresses) |
218 | 218 | { |
219 | 219 | $this->setCachedValue(null); |
220 | - foreach ((array)$addresses as $address) { |
|
220 | + foreach ((array) $addresses as $address) { |
|
221 | 221 | unset($this->_mailboxes[$address]); |
222 | 222 | } |
223 | 223 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $mailboxStr = $email; |
338 | 338 | if ($name) { |
339 | 339 | $nameStr = $this->createDisplayNameString($name, 0 === count($strings)); |
340 | - $mailboxStr = $nameStr . ' <' . $mailboxStr . '>'; |
|
340 | + $mailboxStr = $nameStr.' <'.$mailboxStr.'>'; |
|
341 | 341 | } |
342 | 342 | $strings[] = $mailboxStr; |
343 | 343 | } |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | private function _assertValidAddress($address) |
356 | 356 | { |
357 | 357 | if ($this->_emailValidator->isValidWrapper($address) === false) { |
358 | - throw new Swift_RfcComplianceException('Address in mailbox given [' . $address . '] does not comply with RFC 2822, 3.6.2.'); |
|
358 | + throw new Swift_RfcComplianceException('Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.'); |
|
359 | 359 | } |
360 | 360 | } |
361 | 361 | } |
@@ -203,7 +203,7 @@ |
||
203 | 203 | $to = $start; |
204 | 204 | for (; $this->_currentPos < $end; ++$this->_currentPos) { |
205 | 205 | if (isset($this->_map['i'], $this->_map['i'][$this->_currentPos])) { |
206 | - $ret .= substr($this->_datas, $start, $to - $start) . '?'; |
|
206 | + $ret .= substr($this->_datas, $start, $to - $start).'?'; |
|
207 | 207 | $start = $this->_map['p'][$this->_currentPos]; |
208 | 208 | } else { |
209 | 209 | $to = $this->_map['p'][$this->_currentPos]; |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | throw new Swift_TransportException( |
188 | - 'Failed to authenticate on SMTP server with username "' . |
|
189 | - $this->_username . '" using ' . $count . ' possible authenticators' |
|
188 | + 'Failed to authenticate on SMTP server with username "'. |
|
189 | + $this->_username.'" using '.$count.' possible authenticators' |
|
190 | 190 | ); |
191 | 191 | } |
192 | 192 | } |
@@ -263,6 +263,6 @@ discard block |
||
263 | 263 | } |
264 | 264 | } |
265 | 265 | |
266 | - throw new Swift_TransportException('Auth mode ' . $mode . ' is invalid'); |
|
266 | + throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); |
|
267 | 267 | } |
268 | 268 | } |
@@ -181,7 +181,7 @@ |
||
181 | 181 | ksort($valid_mime_types); |
182 | 182 | |
183 | 183 | // combine mime types and extensions array |
184 | - $output = "$preamble\$swift_mime_types = array(\n " . implode($valid_mime_types, ",\n ") . "\n);"; |
|
184 | + $output = "$preamble\$swift_mime_types = array(\n ".implode($valid_mime_types, ",\n ")."\n);"; |
|
185 | 185 | |
186 | 186 | // write mime_types.php config file |
187 | 187 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | $this->_privateKey = $privateKey; |
205 | 205 | $this->_domainName = $domainName; |
206 | - $this->_signerIdentity = '@' . $domainName; |
|
206 | + $this->_signerIdentity = '@'.$domainName; |
|
207 | 207 | $this->_selector = $selector; |
208 | 208 | |
209 | 209 | // keep fallback hash algorithm sha1 if php version is lower than 5.4.8 |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | // Prepare the DKIM-Signature |
563 | 563 | $params = array('v' => '1', 'a' => $this->_hashAlgorithm, 'bh' => base64_encode($this->_bodyHash), 'd' => $this->_domainName, 'h' => implode(': ', $this->_signedHeaders), 'i' => $this->_signerIdentity, 's' => $this->_selector); |
564 | 564 | if ($this->_bodyCanon != 'simple') { |
565 | - $params['c'] = $this->_headerCanon . '/' . $this->_bodyCanon; |
|
565 | + $params['c'] = $this->_headerCanon.'/'.$this->_bodyCanon; |
|
566 | 566 | } elseif ($this->_headerCanon != 'simple') { |
567 | 567 | $params['c'] = $this->_headerCanon; |
568 | 568 | } |
@@ -587,19 +587,19 @@ discard block |
||
587 | 587 | } |
588 | 588 | $string = ''; |
589 | 589 | foreach ($params as $k => $v) { |
590 | - $string .= $k . '=' . $v . '; '; |
|
590 | + $string .= $k.'='.$v.'; '; |
|
591 | 591 | } |
592 | 592 | $string = trim($string); |
593 | 593 | $headers->addTextHeader('DKIM-Signature', $string); |
594 | 594 | // Add the last DKIM-Signature |
595 | 595 | $tmp = $headers->getAll('DKIM-Signature'); |
596 | 596 | $this->_dkimHeader = end($tmp); |
597 | - $this->_addHeader(trim($this->_dkimHeader->toString()) . "\r\n b=", true); |
|
597 | + $this->_addHeader(trim($this->_dkimHeader->toString())."\r\n b=", true); |
|
598 | 598 | $this->_endOfHeaders(); |
599 | 599 | if ($this->_debugHeaders) { |
600 | 600 | $headers->addTextHeader('X-DebugHash', base64_encode($this->_headerHash)); |
601 | 601 | } |
602 | - $this->_dkimHeader->setValue($string . ' b=' . trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' '))); |
|
602 | + $this->_dkimHeader->setValue($string.' b='.trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' '))); |
|
603 | 603 | |
604 | 604 | return $this; |
605 | 605 | } |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $name = Swift::strtolowerWithStaticCache(trim($exploded[0])); |
620 | 620 | $value = str_replace("\r\n", '', $exploded[1]); |
621 | 621 | $value = preg_replace("/[ \t][ \t]+/", ' ', $value); |
622 | - $header = $name . ':' . trim($value) . ($is_sig ? '' : "\r\n"); |
|
622 | + $header = $name.':'.trim($value).($is_sig ? '' : "\r\n"); |
|
623 | 623 | case 'simple': |
624 | 624 | // Nothing to do |
625 | 625 | } |
@@ -747,11 +747,11 @@ discard block |
||
747 | 747 | } |
748 | 748 | $pkeyId = openssl_get_privatekey($this->_privateKey); |
749 | 749 | if (!$pkeyId) { |
750 | - throw new Swift_SwiftException('Unable to load DKIM Private Key [' . openssl_error_string() . ']'); |
|
750 | + throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']'); |
|
751 | 751 | } |
752 | 752 | if (openssl_sign($this->_headerCanonData, $signature, $pkeyId, $algorithm)) { |
753 | 753 | return $signature; |
754 | 754 | } |
755 | - throw new Swift_SwiftException('Unable to sign DKIM Hash [' . openssl_error_string() . ']'); |
|
755 | + throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']'); |
|
756 | 756 | } |
757 | 757 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | if (!$line) { |
183 | 183 | $metas = stream_get_meta_data($this->_out); |
184 | 184 | if ($metas['timed_out']) { |
185 | - throw new Swift_IoException('Connection to ' . $this->_getReadConnectionDescription() . ' Timed Out'); |
|
185 | + throw new Swift_IoException('Connection to '.$this->_getReadConnectionDescription().' Timed Out'); |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $metas = stream_get_meta_data($this->_out); |
212 | 212 | if ($metas['timed_out']) { |
213 | 213 | throw new Swift_IoException( |
214 | - 'Connection to ' . $this->_getReadConnectionDescription() . ' Timed Out' |
|
214 | + 'Connection to '.$this->_getReadConnectionDescription().' Timed Out' |
|
215 | 215 | ); |
216 | 216 | } |
217 | 217 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $bytesWritten = fwrite($this->_in, substr($bytes, $totalBytesWritten)); |
253 | 253 | if (false === $bytesWritten || 0 === $bytesWritten) { |
254 | 254 | throw new Swift_IoException( |
255 | - 'Connection to ' . $this->_getReadConnectionDescription() . ' has gone away' |
|
255 | + 'Connection to '.$this->_getReadConnectionDescription().' has gone away' |
|
256 | 256 | ); |
257 | 257 | } |
258 | 258 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | |
279 | 279 | $host = $this->_params['host']; |
280 | 280 | if (!empty($this->_params['protocol'])) { |
281 | - $host = $this->_params['protocol'] . '://' . $host; |
|
281 | + $host = $this->_params['protocol'].'://'.$host; |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | $timeout = 15; |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | } |
288 | 288 | |
289 | 289 | if (!empty($this->_params['sourceIp'])) { |
290 | - $options['socket']['bindto'] = $this->_params['sourceIp'] . ':0'; |
|
290 | + $options['socket']['bindto'] = $this->_params['sourceIp'].':0'; |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | if (!empty($this->_params['verifySsl'])) { |
@@ -300,10 +300,10 @@ discard block |
||
300 | 300 | |
301 | 301 | $streamContext = stream_context_create($options); |
302 | 302 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
303 | - $this->_stream = @stream_socket_client($host . ':' . $this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); |
|
303 | + $this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); |
|
304 | 304 | |
305 | 305 | if (false === $this->_stream) { |
306 | - throw new Swift_TransportException('Connection could not be established with host ' . $this->_params['host'] . ' [' . $errstr . ' #' . $errno . ']'); |
|
306 | + throw new Swift_TransportException('Connection could not be established with host '.$this->_params['host'].' ['.$errstr.' #'.$errno.']'); |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | if (!empty($this->_params['blocking'])) { |
@@ -327,13 +327,13 @@ discard block |
||
327 | 327 | 0 => array('pipe', 'r'), |
328 | 328 | 1 => array('pipe', 'w'), |
329 | 329 | 2 => array('pipe', 'w'), |
330 | - );$pipes = array(); |
|
330 | + ); $pipes = array(); |
|
331 | 331 | $this->_stream = proc_open($command, $descriptorSpec, $pipes); |
332 | 332 | stream_set_blocking($pipes[2], 0); |
333 | 333 | |
334 | 334 | $err = stream_get_contents($pipes[2]); |
335 | 335 | if ($err) { |
336 | - throw new Swift_TransportException('Process could not be started [' . $err . ']'); |
|
336 | + throw new Swift_TransportException('Process could not be started ['.$err.']'); |
|
337 | 337 | } |
338 | 338 | |
339 | 339 | $this->_in = &$pipes[0]; |
@@ -344,16 +344,16 @@ discard block |
||
344 | 344 | { |
345 | 345 | switch ($this->_params['type']) { |
346 | 346 | case self::TYPE_PROCESS: |
347 | - return 'Process ' . $this->_params['command']; |
|
347 | + return 'Process '.$this->_params['command']; |
|
348 | 348 | break; |
349 | 349 | |
350 | 350 | case self::TYPE_SOCKET: |
351 | 351 | default: |
352 | 352 | $host = $this->_params['host']; |
353 | 353 | if (!empty($this->_params['protocol'])) { |
354 | - $host = $this->_params['protocol'] . '://' . $host; |
|
354 | + $host = $this->_params['protocol'].'://'.$host; |
|
355 | 355 | } |
356 | - $host .= ':' . $this->_params['port']; |
|
356 | + $host .= ':'.$this->_params['port']; |
|
357 | 357 | |
358 | 358 | return $host; |
359 | 359 | break; |