@@ -48,7 +48,7 @@ |
||
48 | 48 | { |
49 | 49 | try { |
50 | 50 | $param = $this->constructXOAuth2Params($email, $token); |
51 | - $agent->executeCommand('AUTH XOAUTH2 ' . $param . "\r\n", array(235)); |
|
51 | + $agent->executeCommand('AUTH XOAUTH2 '.$param."\r\n", array(235)); |
|
52 | 52 | |
53 | 53 | return true; |
54 | 54 | } catch (Swift_TransportException $e) { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) |
38 | 38 | { |
39 | 39 | try { |
40 | - $message = base64_encode($username . chr(0) . $username . chr(0) . $password); |
|
40 | + $message = base64_encode($username.chr(0).$username.chr(0).$password); |
|
41 | 41 | $agent->executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); |
42 | 42 | |
43 | 43 | return true; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function send(Swift_Mime_Message $message, &$failedRecipients = null) |
101 | 101 | { |
102 | - $failedRecipients = (array)$failedRecipients; |
|
102 | + $failedRecipients = (array) $failedRecipients; |
|
103 | 103 | $command = $this->getCommand(); |
104 | 104 | $buffer = $this->getBuffer(); |
105 | 105 | $count = 0; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | if (false === strpos($command, ' -f')) { |
119 | - $command .= ' -f' . escapeshellarg($this->_getReversePath($message)); |
|
119 | + $command .= ' -f'.escapeshellarg($this->_getReversePath($message)); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | $buffer->initialize(array_merge($this->_params, array('command' => $command))); |
@@ -127,9 +127,9 @@ discard block |
||
127 | 127 | $buffer->setWriteTranslations(array("\r\n" => "\n")); |
128 | 128 | } |
129 | 129 | |
130 | - $count = count((array)$message->getTo()) |
|
131 | - + count((array)$message->getCc()) |
|
132 | - + count((array)$message->getBcc()); |
|
130 | + $count = count((array) $message->getTo()) |
|
131 | + + count((array) $message->getCc()) |
|
132 | + + count((array) $message->getBcc()); |
|
133 | 133 | |
134 | 134 | $message->toByteStream($buffer); |
135 | 135 | $buffer->flushBuffers(); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } else { |
153 | 153 | $this->_throwException( |
154 | 154 | new Swift_TransportException( |
155 | - 'Unsupported sendmail command flags [' . $command . ']. ' . |
|
155 | + 'Unsupported sendmail command flags ['.$command.']. '. |
|
156 | 156 | 'Must be one of "-bs" or "-t" but can include additional flags.' |
157 | 157 | ) |
158 | 158 | ); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | if (!$line) { |
184 | 184 | $metas = stream_get_meta_data($this->_out); |
185 | 185 | if ($metas['timed_out']) { |
186 | - throw new Swift_IoException('Connection to ' . $this->_getReadConnectionDescription() . ' Timed Out'); |
|
186 | + throw new Swift_IoException('Connection to '.$this->_getReadConnectionDescription().' Timed Out'); |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $metas = stream_get_meta_data($this->_out); |
213 | 213 | if ($metas['timed_out']) { |
214 | 214 | throw new Swift_IoException( |
215 | - 'Connection to ' . $this->_getReadConnectionDescription() . ' Timed Out' |
|
215 | + 'Connection to '.$this->_getReadConnectionDescription().' Timed Out' |
|
216 | 216 | ); |
217 | 217 | } |
218 | 218 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $bytesWritten = fwrite($this->_in, substr($bytes, $totalBytesWritten)); |
254 | 254 | if (false === $bytesWritten || 0 === $bytesWritten) { |
255 | 255 | throw new Swift_IoException( |
256 | - 'Connection to ' . $this->_getReadConnectionDescription() . ' has gone away' |
|
256 | + 'Connection to '.$this->_getReadConnectionDescription().' has gone away' |
|
257 | 257 | ); |
258 | 258 | } |
259 | 259 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | |
278 | 278 | $host = $this->_params['host']; |
279 | 279 | if (!empty($this->_params['protocol'])) { |
280 | - $host = $this->_params['protocol'] . '://' . $host; |
|
280 | + $host = $this->_params['protocol'].'://'.$host; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | $timeout = 15; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | } |
287 | 287 | |
288 | 288 | if (!empty($this->_params['sourceIp'])) { |
289 | - $options['socket']['bindto'] = $this->_params['sourceIp'] . ':0'; |
|
289 | + $options['socket']['bindto'] = $this->_params['sourceIp'].':0'; |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | if (isset($this->_params['stream_context_options'])) { |
@@ -294,10 +294,10 @@ discard block |
||
294 | 294 | } |
295 | 295 | |
296 | 296 | $streamContext = stream_context_create($options); |
297 | - $this->_stream = @stream_socket_client($host . ':' . $this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); |
|
297 | + $this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); |
|
298 | 298 | |
299 | 299 | if (false === $this->_stream) { |
300 | - throw new Swift_TransportException('Connection could not be established with host ' . $this->_params['host'] . ' [' . $errstr . ' #' . $errno . ']'); |
|
300 | + throw new Swift_TransportException('Connection could not be established with host '.$this->_params['host'].' ['.$errstr.' #'.$errno.']'); |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | if (!empty($this->_params['blocking'])) { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | |
329 | 329 | $err = stream_get_contents($pipes[2]); |
330 | 330 | if ($err) { |
331 | - throw new Swift_TransportException('Process could not be started [' . $err . ']'); |
|
331 | + throw new Swift_TransportException('Process could not be started ['.$err.']'); |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | $this->_in = &$pipes[0]; |
@@ -339,16 +339,16 @@ discard block |
||
339 | 339 | { |
340 | 340 | switch ($this->_params['type']) { |
341 | 341 | case self::TYPE_PROCESS: |
342 | - return 'Process ' . $this->_params['command']; |
|
342 | + return 'Process '.$this->_params['command']; |
|
343 | 343 | break; |
344 | 344 | |
345 | 345 | case self::TYPE_SOCKET: |
346 | 346 | default: |
347 | 347 | $host = $this->_params['host']; |
348 | 348 | if (!empty($this->_params['protocol'])) { |
349 | - $host = $this->_params['protocol'] . '://' . $host; |
|
349 | + $host = $this->_params['protocol'].'://'.$host; |
|
350 | 350 | } |
351 | - $host .= ':' . $this->_params['port']; |
|
351 | + $host .= ':'.$this->_params['port']; |
|
352 | 352 | |
353 | 353 | return $host; |
354 | 354 | break; |
@@ -95,14 +95,14 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function setSignCertificate($certificate, $privateKey = null, $signOptions = PKCS7_DETACHED, $extraCerts = null) |
97 | 97 | { |
98 | - $this->signCertificate = 'file://' . str_replace('\\', '/', realpath($certificate)); |
|
98 | + $this->signCertificate = 'file://'.str_replace('\\', '/', realpath($certificate)); |
|
99 | 99 | |
100 | 100 | if (null !== $privateKey) { |
101 | 101 | if (is_array($privateKey)) { |
102 | 102 | $this->signPrivateKey = $privateKey; |
103 | - $this->signPrivateKey[0] = 'file://' . str_replace('\\', '/', realpath($privateKey[0])); |
|
103 | + $this->signPrivateKey[0] = 'file://'.str_replace('\\', '/', realpath($privateKey[0])); |
|
104 | 104 | } else { |
105 | - $this->signPrivateKey = 'file://' . str_replace('\\', '/', realpath($privateKey)); |
|
105 | + $this->signPrivateKey = 'file://'.str_replace('\\', '/', realpath($privateKey)); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -131,10 +131,10 @@ discard block |
||
131 | 131 | $this->encryptCert = array(); |
132 | 132 | |
133 | 133 | foreach ($recipientCerts as $cert) { |
134 | - $this->encryptCert[] = 'file://' . str_replace('\\', '/', realpath($cert)); |
|
134 | + $this->encryptCert[] = 'file://'.str_replace('\\', '/', realpath($cert)); |
|
135 | 135 | } |
136 | 136 | } else { |
137 | - $this->encryptCert = 'file://' . str_replace('\\', '/', realpath($recipientCerts)); |
|
137 | + $this->encryptCert = 'file://'.str_replace('\\', '/', realpath($recipientCerts)); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | if (null !== $cipher) { |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | foreach ($headerLines as $headerLine) { |
381 | 381 | // Line separated |
382 | 382 | if (ctype_space($headerLines[0]) || false === strpos($headerLine, ':')) { |
383 | - $headers[$currentHeaderName] .= ' ' . trim($headerLine); |
|
383 | + $headers[$currentHeaderName] .= ' '.trim($headerLine); |
|
384 | 384 | continue; |
385 | 385 | } |
386 | 386 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $header = new Swift_Mime_Headers_OpenDKIMHeader('DKIM-Signature'); |
80 | 80 | $headerVal = $this->_dkimHandler->getSignatureHeader(); |
81 | 81 | if (!$headerVal) { |
82 | - throw new Swift_SwiftException('OpenDKIM Error: ' . $this->_dkimHandler->getError()); |
|
82 | + throw new Swift_SwiftException('OpenDKIM Error: '.$this->_dkimHandler->getError()); |
|
83 | 83 | } |
84 | 84 | $header->setValue($headerVal); |
85 | 85 | $headers->set($header); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | OpenDKIM::setOption(OpenDKIM::OPTS_FIXEDTIME, time()); |
113 | 113 | } else { |
114 | 114 | if (!OpenDKIM::setOption(OpenDKIM::OPTS_FIXEDTIME, $this->_signatureTimestamp)) { |
115 | - throw new Swift_SwiftException('Unable to force signature timestamp [' . openssl_error_string() . ']'); |
|
115 | + throw new Swift_SwiftException('Unable to force signature timestamp ['.openssl_error_string().']'); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 |
@@ -134,7 +134,7 @@ |
||
134 | 134 | $code = $e->getCode(); |
135 | 135 | $this->_logger->add(sprintf('!! %s (code: %s)', $message, $code)); |
136 | 136 | $message .= PHP_EOL; |
137 | - $message .= 'Log data:' . PHP_EOL; |
|
137 | + $message .= 'Log data:'.PHP_EOL; |
|
138 | 138 | $message .= $this->_logger->dump(); |
139 | 139 | $evt->cancelBubble(); |
140 | 140 | throw new Swift_TransportException($message, $code, $e->getPrevious()); |
@@ -25,14 +25,14 @@ |
||
25 | 25 | public function notify(Swift_Mime_Message $message, $address, $result) |
26 | 26 | { |
27 | 27 | if (self::RESULT_PASS === $result) { |
28 | - echo '<div style="color: #fff; background: #006600; padding: 2px; margin: 2px;">' . PHP_EOL; |
|
29 | - echo 'PASS ' . $address . PHP_EOL; |
|
30 | - echo '</div>' . PHP_EOL; |
|
28 | + echo '<div style="color: #fff; background: #006600; padding: 2px; margin: 2px;">'.PHP_EOL; |
|
29 | + echo 'PASS '.$address.PHP_EOL; |
|
30 | + echo '</div>'.PHP_EOL; |
|
31 | 31 | flush(); |
32 | 32 | } else { |
33 | - echo '<div style="color: #fff; background: #880000; padding: 2px; margin: 2px;">' . PHP_EOL; |
|
34 | - echo 'FAIL ' . $address . PHP_EOL; |
|
35 | - echo '</div>' . PHP_EOL; |
|
33 | + echo '<div style="color: #fff; background: #880000; padding: 2px; margin: 2px;">'.PHP_EOL; |
|
34 | + echo 'FAIL '.$address.PHP_EOL; |
|
35 | + echo '</div>'.PHP_EOL; |
|
36 | 36 | flush(); |
37 | 37 | } |
38 | 38 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | if ( |
64 | 64 | $currentLine !== '' |
65 | 65 | && |
66 | - strlen($currentLine . $encodedChar) > $thisLineLength |
|
66 | + strlen($currentLine.$encodedChar) > $thisLineLength |
|
67 | 67 | ) { |
68 | 68 | $lines[] = ''; |
69 | 69 | $currentLine = &$lines[$lineCount++]; |