@@ -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']); |
@@ -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 */ |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | return array('DKIM-Signature', 'X-DebugHash'); |
511 | 511 | } |
512 | 512 | |
513 | - return array('DKIM-Signature'); |
|
513 | + return array('DKIM-Signature'); |
|
514 | 514 | } |
515 | 515 | |
516 | 516 | /** |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | |
592 | 592 | if ($this->_signatureTimestamp === true) { |
593 | 593 | |
594 | - $params['t'] = time(); |
|
594 | + $params['t'] = time(); |
|
595 | 595 | if ($this->_signatureExpiration !== false) { |
596 | 596 | $params['x'] = $params['t'] + $this->_signatureExpiration; |
597 | 597 | } |
@@ -739,8 +739,8 @@ discard block |
||
739 | 739 | { |
740 | 740 | $len = strlen($string); |
741 | 741 | if ($len > ($new_len = ($this->_maxLen - $this->_bodyLen))) { |
742 | - /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
743 | - $string = substr($string, 0, $new_len); |
|
742 | + /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
743 | + $string = substr($string, 0, $new_len); |
|
744 | 744 | $len = $new_len; |
745 | 745 | } |
746 | 746 | hash_update($this->_bodyHashHandler, $string); |
@@ -779,9 +779,9 @@ discard block |
||
779 | 779 | } |
780 | 780 | |
781 | 781 | if ($this->_passphrase) { |
782 | - $pkeyId = openssl_get_privatekey($this->_privateKey, $this->_passphrase); |
|
782 | + $pkeyId = openssl_get_privatekey($this->_privateKey, $this->_passphrase); |
|
783 | 783 | } else { |
784 | - $pkeyId = openssl_get_privatekey($this->_privateKey); |
|
784 | + $pkeyId = openssl_get_privatekey($this->_privateKey); |
|
785 | 785 | } |
786 | 786 | if (!$pkeyId) { |
787 | 787 | throw new Swift_SwiftException('Unable to load DKIM Private Key [' . openssl_error_string() . ']'); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | { |
210 | 210 | $this->_privateKey = $privateKey; |
211 | 211 | $this->_domainName = $domainName; |
212 | - $this->_signerIdentity = '@' . $domainName; |
|
212 | + $this->_signerIdentity = '@'.$domainName; |
|
213 | 213 | $this->_selector = $selector; |
214 | 214 | $this->_passphrase = $passphrase; |
215 | 215 | |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | ); |
581 | 581 | |
582 | 582 | if ($this->_bodyCanon != 'simple') { |
583 | - $params['c'] = $this->_headerCanon . '/' . $this->_bodyCanon; |
|
583 | + $params['c'] = $this->_headerCanon.'/'.$this->_bodyCanon; |
|
584 | 584 | } elseif ($this->_headerCanon != 'simple') { |
585 | 585 | $params['c'] = $this->_headerCanon; |
586 | 586 | } |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | |
615 | 615 | $string = ''; |
616 | 616 | foreach ($params as $k => $v) { |
617 | - $string .= $k . '=' . $v . '; '; |
|
617 | + $string .= $k.'='.$v.'; '; |
|
618 | 618 | } |
619 | 619 | |
620 | 620 | $string = trim($string); |
@@ -623,14 +623,14 @@ discard block |
||
623 | 623 | // Add the last DKIM-Signature |
624 | 624 | $tmp = $headers->getAll('DKIM-Signature'); |
625 | 625 | $this->_dkimHeader = end($tmp); |
626 | - $this->_addHeader(trim($this->_dkimHeader->toString()) . "\r\n b=", true); |
|
626 | + $this->_addHeader(trim($this->_dkimHeader->toString())."\r\n b=", true); |
|
627 | 627 | $this->_endOfHeaders(); |
628 | 628 | |
629 | 629 | if ($this->_debugHeaders) { |
630 | 630 | $headers->addTextHeader('X-DebugHash', base64_encode($this->_headerHash)); |
631 | 631 | } |
632 | 632 | |
633 | - $this->_dkimHeader->setValue($string . ' b=' . trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' '))); |
|
633 | + $this->_dkimHeader->setValue($string.' b='.trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' '))); |
|
634 | 634 | |
635 | 635 | return $this; |
636 | 636 | } |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | $name = Swift::strtolowerWithStaticCache(trim($exploded[0])); |
649 | 649 | $value = str_replace("\r\n", '', $exploded[1]); |
650 | 650 | $value = preg_replace("/[ \t][ \t]+/", ' ', $value); |
651 | - $header = $name . ':' . trim($value) . ($is_sig ? '' : "\r\n"); |
|
651 | + $header = $name.':'.trim($value).($is_sig ? '' : "\r\n"); |
|
652 | 652 | case 'simple': |
653 | 653 | // Nothing to do |
654 | 654 | } |
@@ -784,13 +784,13 @@ discard block |
||
784 | 784 | $pkeyId = openssl_get_privatekey($this->_privateKey); |
785 | 785 | } |
786 | 786 | if (!$pkeyId) { |
787 | - throw new Swift_SwiftException('Unable to load DKIM Private Key [' . openssl_error_string() . ']'); |
|
787 | + throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']'); |
|
788 | 788 | } |
789 | 789 | |
790 | 790 | if (openssl_sign($this->_headerCanonData, $signature, $pkeyId, $algorithm)) { |
791 | 791 | return $signature; |
792 | 792 | } |
793 | 793 | |
794 | - throw new Swift_SwiftException('Unable to sign DKIM Hash [' . openssl_error_string() . ']'); |
|
794 | + throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']'); |
|
795 | 795 | } |
796 | 796 | } |
@@ -248,10 +248,10 @@ discard block |
||
248 | 248 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
249 | 249 | /** @noinspection UsageOfSilenceOperatorInspection */ |
250 | 250 | @uasort($assoc, array($this, '_sortHandlers')); |
251 | - $this->_handlers = $assoc; |
|
252 | - $this->_setHandlerParams(); |
|
251 | + $this->_handlers = $assoc; |
|
252 | + $this->_setHandlerParams(); |
|
253 | 253 | |
254 | - return $this; |
|
254 | + return $this; |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | return $this; |
326 | 326 | } |
327 | 327 | |
328 | - return $return; |
|
328 | + return $return; |
|
329 | 329 | } |
330 | 330 | } |
331 | 331 |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function setPort($port) |
95 | 95 | { |
96 | - $this->_params['port'] = (int)$port; |
|
96 | + $this->_params['port'] = (int) $port; |
|
97 | 97 | |
98 | 98 | return $this; |
99 | 99 | } |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function setTimeout($timeout) |
119 | 119 | { |
120 | - $this->_params['timeout'] = (int)$timeout; |
|
121 | - $this->_buffer->setParam('timeout', (int)$timeout); |
|
120 | + $this->_params['timeout'] = (int) $timeout; |
|
121 | + $this->_buffer->setParam('timeout', (int) $timeout); |
|
122 | 122 | |
123 | 123 | return $this; |
124 | 124 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | */ |
279 | 279 | public function executeCommand($command, $codes = array(), &$failures = null) |
280 | 280 | { |
281 | - $failures = (array)$failures; |
|
281 | + $failures = (array) $failures; |
|
282 | 282 | $stopSignal = false; |
283 | 283 | $response = null; |
284 | 284 | |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | |
310 | 310 | $inArray = in_array( |
311 | 311 | Swift::strtolowerWithStaticCache($method), |
312 | - array_map(array('Swift', 'strtolowerWithStaticCache'), (array)$handler->exposeMixinMethods()), |
|
312 | + array_map(array('Swift', 'strtolowerWithStaticCache'), (array) $handler->exposeMixinMethods()), |
|
313 | 313 | true |
314 | 314 | ); |
315 | 315 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | } |
331 | 331 | |
332 | - trigger_error('Call to undefined method ' . $method, E_USER_ERROR); |
|
332 | + trigger_error('Call to undefined method '.$method, E_USER_ERROR); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /** Get the params to initialize the buffer */ |
@@ -395,10 +395,10 @@ discard block |
||
395 | 395 | |
396 | 396 | $params = array(); |
397 | 397 | foreach ($handlers as $handler) { |
398 | - $params = array_merge($params, (array)$handler->getMailParams()); |
|
398 | + $params = array_merge($params, (array) $handler->getMailParams()); |
|
399 | 399 | } |
400 | 400 | |
401 | - $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; |
|
401 | + $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; |
|
402 | 402 | $this->executeCommand( |
403 | 403 | sprintf("MAIL FROM:<%s>%s\r\n", $address, $paramStr), array(250) |
404 | 404 | ); |
@@ -415,10 +415,10 @@ discard block |
||
415 | 415 | |
416 | 416 | $params = array(); |
417 | 417 | foreach ($handlers as $handler) { |
418 | - $params = array_merge($params, (array)$handler->getRcptParams()); |
|
418 | + $params = array_merge($params, (array) $handler->getRcptParams()); |
|
419 | 419 | } |
420 | 420 | |
421 | - $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; |
|
421 | + $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; |
|
422 | 422 | $this->executeCommand( |
423 | 423 | sprintf("RCPT TO:<%s>%s\r\n", $address, $paramStr), array(250, 251, 252) |
424 | 424 | ); |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | { |
38 | 38 | $this->_path = $path; |
39 | 39 | |
40 | - /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
|
41 | - if ( |
|
40 | + /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
|
41 | + if ( |
|
42 | 42 | !file_exists($this->_path) |
43 | 43 | && |
44 | 44 | !@mkdir($this->_path, 0777, true) |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | return false; |
108 | 108 | } |
109 | 109 | return fclose($fp); |
110 | - } |
|
110 | + } |
|
111 | 111 | |
112 | 112 | /* The file already exists, we try a longer fileName */ |
113 | 113 | $fileName .= $this->getRandomString(1); |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | public function queueMessage(Swift_Mime_Message $message) |
98 | 98 | { |
99 | 99 | $ser = serialize($message); |
100 | - $fileName = $this->_path . '/' . $this->getRandomString(); |
|
100 | + $fileName = $this->_path.'/'.$this->getRandomString(); |
|
101 | 101 | for ($i = 0; $i < $this->_retryLimit; ++$i) { |
102 | 102 | /* We try an exclusive creation of the file. This is an atomic operation, it avoid locking mechanism */ |
103 | 103 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
104 | - $fp = @fopen($fileName . '.message', 'xb'); |
|
104 | + $fp = @fopen($fileName.'.message', 'xb'); |
|
105 | 105 | if (false !== $fp) { |
106 | 106 | if (false === fwrite($fp, $ser)) { |
107 | 107 | return false; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
160 | - $failedRecipients = (array)$failedRecipients; |
|
160 | + $failedRecipients = (array) $failedRecipients; |
|
161 | 161 | $count = 0; |
162 | 162 | $time = time(); |
163 | 163 | foreach ($directoryIterator as $file) { |
@@ -168,13 +168,13 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | /* We try a rename, it's an atomic operation, and avoid locking the file */ |
171 | - if (rename($file, $file . '.sending')) { |
|
171 | + if (rename($file, $file.'.sending')) { |
|
172 | 172 | // TODO: -> SECURITY | Perhaps it's possible to exploit the unserialize via: file_get_contents(...) |
173 | - $message = unserialize(file_get_contents($file . '.sending')); |
|
173 | + $message = unserialize(file_get_contents($file.'.sending')); |
|
174 | 174 | |
175 | 175 | $count += $transport->send($message, $failedRecipients); |
176 | 176 | |
177 | - unlink($file . '.sending'); |
|
177 | + unlink($file.'.sending'); |
|
178 | 178 | } else { |
179 | 179 | /* This message has just been catched by another process */ |
180 | 180 | continue; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | foreach ($this->_params as $name => $value) { |
137 | 137 | if (null !== $value) { |
138 | 138 | // Add the parameter |
139 | - $body .= '; ' . $this->_createParameter($name, $value); |
|
139 | + $body .= '; '.$this->_createParameter($name, $value); |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $tokens[count($tokens) - 1] .= ';'; |
165 | 165 | $tokens = array_merge( |
166 | 166 | $tokens, |
167 | - $this->generateTokenLines(' ' . $this->_createParameter($name, $value)) |
|
167 | + $this->generateTokenLines(' '.$this->_createParameter($name, $value)) |
|
168 | 168 | ); |
169 | 169 | } |
170 | 170 | } |
@@ -186,13 +186,13 @@ discard block |
||
186 | 186 | |
187 | 187 | $encoded = false; |
188 | 188 | // Allow room for parameter name, indices, "=" and DQUOTEs |
189 | - $maxValueLength = $this->getMaxLineLength() - strlen($name . '=*N"";') - 1; |
|
189 | + $maxValueLength = $this->getMaxLineLength() - strlen($name.'=*N"";') - 1; |
|
190 | 190 | $firstLineOffset = 0; |
191 | 191 | |
192 | 192 | |
193 | 193 | if ( |
194 | 194 | // If it's not already a valid parameter value ... |
195 | - !preg_match('/^' . self::TOKEN_REGEX . '$/D', $value) |
|
195 | + !preg_match('/^'.self::TOKEN_REGEX.'$/D', $value) |
|
196 | 196 | && |
197 | 197 | // ... and it's not ascii |
198 | 198 | !UTF8::is_ascii($value) |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | $encoded = true; |
201 | 201 | |
202 | 202 | // Allow space for the indices, charset and language. |
203 | - $maxValueLength = $this->getMaxLineLength() - strlen($name . '*N*="";') - 1; |
|
204 | - $firstLineOffset = strlen($this->getCharset() . "'" . $this->getLanguage() . "'"); |
|
203 | + $maxValueLength = $this->getMaxLineLength() - strlen($name.'*N*="";') - 1; |
|
204 | + $firstLineOffset = strlen($this->getCharset()."'".$this->getLanguage()."'"); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | // Encode if we need to ... |
@@ -230,13 +230,13 @@ discard block |
||
230 | 230 | if (count($valueLines) > 1) { |
231 | 231 | $paramLines = array(); |
232 | 232 | foreach ($valueLines as $i => $line) { |
233 | - $paramLines[] = $name . '*' . $i . $this->_getEndOfParameterValue($line, true, $i === 0); |
|
233 | + $paramLines[] = $name.'*'.$i.$this->_getEndOfParameterValue($line, true, $i === 0); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | return implode(";\r\n ", $paramLines); |
237 | 237 | } |
238 | 238 | |
239 | - return $name . $this->_getEndOfParameterValue( |
|
239 | + return $name.$this->_getEndOfParameterValue( |
|
240 | 240 | $valueLines[0], |
241 | 241 | $encoded, |
242 | 242 | true |
@@ -254,18 +254,18 @@ discard block |
||
254 | 254 | */ |
255 | 255 | private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false) |
256 | 256 | { |
257 | - if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value)) { |
|
258 | - $value = '"' . $value . '"'; |
|
257 | + if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { |
|
258 | + $value = '"'.$value.'"'; |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | $prepend = '='; |
262 | 262 | if ($encoded) { |
263 | 263 | $prepend = '*='; |
264 | 264 | if ($firstLine) { |
265 | - $prepend = '*=' . $this->getCharset() . "'" . $this->getLanguage() . "'"; |
|
265 | + $prepend = '*='.$this->getCharset()."'".$this->getLanguage()."'"; |
|
266 | 266 | } |
267 | 267 | } |
268 | 268 | |
269 | - return $prepend . $value; |
|
269 | + return $prepend.$value; |
|
270 | 270 | } |
271 | 271 | } |
@@ -186,8 +186,8 @@ |
||
186 | 186 | || |
187 | 187 | feof($this->_out) |
188 | 188 | ) { |
189 | - // TODO? |
|
190 | - return; |
|
189 | + // TODO? |
|
190 | + return; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | $line = fgets($this->_out); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | if (!$line) { |
195 | 195 | $metas = stream_get_meta_data($this->_out); |
196 | 196 | if ($metas['timed_out']) { |
197 | - throw new Swift_IoException('Connection to ' . $this->_getReadConnectionDescription() . ' Timed Out'); |
|
197 | + throw new Swift_IoException('Connection to '.$this->_getReadConnectionDescription().' Timed Out'); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $metas = stream_get_meta_data($this->_out); |
231 | 231 | if ($metas['timed_out']) { |
232 | 232 | throw new Swift_IoException( |
233 | - 'Connection to ' . $this->_getReadConnectionDescription() . ' Timed Out' |
|
233 | + 'Connection to '.$this->_getReadConnectionDescription().' Timed Out' |
|
234 | 234 | ); |
235 | 235 | } |
236 | 236 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $bytesWritten = fwrite($this->_in, substr($bytes, $totalBytesWritten)); |
279 | 279 | if (false === $bytesWritten || 0 === $bytesWritten) { |
280 | 280 | throw new Swift_IoException( |
281 | - 'Connection to ' . $this->_getReadConnectionDescription() . ' has gone away' |
|
281 | + 'Connection to '.$this->_getReadConnectionDescription().' has gone away' |
|
282 | 282 | ); |
283 | 283 | } |
284 | 284 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | $host = $this->_params['host']; |
308 | 308 | if (!empty($this->_params['protocol'])) { |
309 | - $host = $this->_params['protocol'] . '://' . $host; |
|
309 | + $host = $this->_params['protocol'].'://'.$host; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | $timeout = 15; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | } |
316 | 316 | |
317 | 317 | if (!empty($this->_params['sourceIp'])) { |
318 | - $options['socket']['bindto'] = $this->_params['sourceIp'] . ':0'; |
|
318 | + $options['socket']['bindto'] = $this->_params['sourceIp'].':0'; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | if (!empty($this->_params['verifySsl'])) { |
@@ -328,10 +328,10 @@ discard block |
||
328 | 328 | |
329 | 329 | $streamContext = stream_context_create($options); |
330 | 330 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
331 | - $this->_stream = @stream_socket_client($host . ':' . $this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); |
|
331 | + $this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); |
|
332 | 332 | |
333 | 333 | if (false === $this->_stream) { |
334 | - throw new Swift_TransportException('Connection could not be established with host ' . $this->_params['host'] . ' [' . $errstr . ' #' . $errno . ']'); |
|
334 | + throw new Swift_TransportException('Connection could not be established with host '.$this->_params['host'].' ['.$errstr.' #'.$errno.']'); |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | if (!empty($this->_params['blocking'])) { |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | |
364 | 364 | $err = stream_get_contents($pipes[2]); |
365 | 365 | if ($err) { |
366 | - throw new Swift_TransportException('Process could not be started [' . $err . ']'); |
|
366 | + throw new Swift_TransportException('Process could not be started ['.$err.']'); |
|
367 | 367 | } |
368 | 368 | |
369 | 369 | $this->_in = &$pipes[0]; |
@@ -377,16 +377,16 @@ discard block |
||
377 | 377 | { |
378 | 378 | switch ($this->_params['type']) { |
379 | 379 | case self::TYPE_PROCESS: |
380 | - return 'Process ' . $this->_params['command']; |
|
380 | + return 'Process '.$this->_params['command']; |
|
381 | 381 | break; |
382 | 382 | |
383 | 383 | case self::TYPE_SOCKET: |
384 | 384 | default: |
385 | 385 | $host = $this->_params['host']; |
386 | 386 | if (!empty($this->_params['protocol'])) { |
387 | - $host = $this->_params['protocol'] . '://' . $host; |
|
387 | + $host = $this->_params['protocol'].'://'.$host; |
|
388 | 388 | } |
389 | - $host .= ':' . $this->_params['port']; |
|
389 | + $host .= ':'.$this->_params['port']; |
|
390 | 390 | |
391 | 391 | return $host; |
392 | 392 | break; |