Completed
Push — develop ( cb7ecf...5e631f )
by Dmytro
17s
created
manager/media/rss/extlib/Snoopy.class.inc 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                         // using proxy, send entire URI
150 150
                         $this->_httprequest($URI, $fp, $URI, $this->_httpmethod);
151 151
                     } else {
152
-                        $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : "");
152
+                        $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
153 153
                         // no proxy, send only the path
154 154
                         $this->_httprequest($path, $fp, $URI, $this->_httpmethod);
155 155
                     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                         /* url was redirected, check if we've hit the max depth */
161 161
                         if ($this->maxredirs > $this->_redirectdepth) {
162 162
                             // only follow redirect if it's on this site, or offsiteok is true
163
-                            if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) {
163
+                            if (preg_match("|^https?://".preg_quote($this->host)."|i", $this->_redirectaddr) || $this->offsiteok) {
164 164
                                 /* follow the redirect */
165 165
                                 $this->_redirectdepth++;
166 166
                                 $this->lastredirectaddr = $this->_redirectaddr;
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 break;
189 189
             default:
190 190
                 // not a valid protocol
191
-                $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n';
191
+                $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
192 192
                 return false;
193 193
                 break;
194 194
         }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                         // using proxy, send entire URI
240 240
                         $this->_httprequest($URI, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
241 241
                     } else {
242
-                        $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : "");
242
+                        $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
243 243
                         // no proxy, send only the path
244 244
                         $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
245 245
                     }
@@ -249,11 +249,11 @@  discard block
 block discarded – undo
249 249
                     if ($this->_redirectaddr) {
250 250
                         /* url was redirected, check if we've hit the max depth */
251 251
                         if ($this->maxredirs > $this->_redirectdepth) {
252
-                            if (!preg_match("|^" . $URI_PARTS["scheme"] . "://|", $this->_redirectaddr))
253
-                                $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr, $URI_PARTS["scheme"] . "://" . $URI_PARTS["host"]);
252
+                            if (!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
253
+                                $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr, $URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
254 254
 
255 255
                             // only follow redirect if it's on this site, or offsiteok is true
256
-                            if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) {
256
+                            if (preg_match("|^https?://".preg_quote($this->host)."|i", $this->_redirectaddr) || $this->offsiteok) {
257 257
                                 /* follow the redirect */
258 258
                                 $this->_redirectdepth++;
259 259
                                 $this->lastredirectaddr = $this->_redirectaddr;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 break;
286 286
             default:
287 287
                 // not a valid protocol
288
-                $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n';
288
+                $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
289 289
                 return false;
290 290
                 break;
291 291
         }
@@ -585,9 +585,9 @@  discard block
 block discarded – undo
585 585
         $match = preg_replace("|/$|", "", $match);
586 586
         $match_part = parse_url($match);
587 587
         $match_root =
588
-            $match_part["scheme"] . "://" . $match_part["host"];
588
+            $match_part["scheme"]."://".$match_part["host"];
589 589
 
590
-        $search = array("|^http://" . preg_quote($this->host) . "|i",
590
+        $search = array("|^http://".preg_quote($this->host)."|i",
591 591
             "|^(\/)|i",
592 592
             "|^(?!http://)(?!mailto:)|i",
593 593
             "|/\./|",
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
         );
596 596
 
597 597
         $replace = array("",
598
-            $match_root . "/",
599
-            $match . "/",
598
+            $match_root."/",
599
+            $match."/",
600 600
             "/",
601 601
             "/"
602 602
         );
@@ -625,17 +625,17 @@  discard block
 block discarded – undo
625 625
         $URI_PARTS = parse_url($URI);
626 626
         if (empty($url))
627 627
             $url = "/";
628
-        $headers = $http_method . " " . $url . " " . $this->_httpversion . "\r\n";
628
+        $headers = $http_method." ".$url." ".$this->_httpversion."\r\n";
629 629
         if (!empty($this->host) && !isset($this->rawheaders['Host'])) {
630
-            $headers .= "Host: " . $this->host;
630
+            $headers .= "Host: ".$this->host;
631 631
             if (!empty($this->port) && $this->port != '80')
632
-                $headers .= ":" . $this->port;
632
+                $headers .= ":".$this->port;
633 633
             $headers .= "\r\n";
634 634
         }
635 635
         if (!empty($this->agent))
636
-            $headers .= "User-Agent: " . $this->agent . "\r\n";
636
+            $headers .= "User-Agent: ".$this->agent."\r\n";
637 637
         if (!empty($this->accept))
638
-            $headers .= "Accept: " . $this->accept . "\r\n";
638
+            $headers .= "Accept: ".$this->accept."\r\n";
639 639
         if ($this->use_gzip) {
640 640
             // make sure PHP was built with --with-zlib
641 641
             // and we can handle gzipp'ed data
@@ -643,46 +643,46 @@  discard block
 block discarded – undo
643 643
                 $headers .= "Accept-encoding: gzip\r\n";
644 644
             } else {
645 645
                 trigger_error(
646
-                    "use_gzip is on, but PHP was built without zlib support." .
646
+                    "use_gzip is on, but PHP was built without zlib support.".
647 647
                     "  Requesting file(s) without gzip encoding.",
648 648
                     E_USER_NOTICE);
649 649
             }
650 650
         }
651 651
         if (!empty($this->referer))
652
-            $headers .= "Referer: " . $this->referer . "\r\n";
652
+            $headers .= "Referer: ".$this->referer."\r\n";
653 653
         if (!empty($this->cookies)) {
654 654
             if (!is_array($this->cookies))
655
-                $this->cookies = (array)$this->cookies;
655
+                $this->cookies = (array) $this->cookies;
656 656
 
657 657
             reset($this->cookies);
658 658
             if (count($this->cookies) > 0) {
659 659
                 $cookie_headers .= 'Cookie: ';
660 660
                 foreach ($this->cookies as $cookieKey => $cookieVal) {
661
-                    $cookie_headers .= $cookieKey . "=" . urlencode($cookieVal) . "; ";
661
+                    $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
662 662
                 }
663
-                $headers .= substr($cookie_headers, 0, -2) . "\r\n";
663
+                $headers .= substr($cookie_headers, 0, -2)."\r\n";
664 664
             }
665 665
         }
666 666
         if (!empty($this->rawheaders)) {
667 667
             if (!is_array($this->rawheaders))
668
-                $this->rawheaders = (array)$this->rawheaders;
668
+                $this->rawheaders = (array) $this->rawheaders;
669 669
             while (list($headerKey, $headerVal) = each($this->rawheaders))
670
-                $headers .= $headerKey . ": " . $headerVal . "\r\n";
670
+                $headers .= $headerKey.": ".$headerVal."\r\n";
671 671
         }
672 672
         if (!empty($content_type)) {
673 673
             $headers .= "Content-type: $content_type";
674 674
             if ($content_type == "multipart/form-data")
675
-                $headers .= "; boundary=" . $this->_mime_boundary;
675
+                $headers .= "; boundary=".$this->_mime_boundary;
676 676
             $headers .= "\r\n";
677 677
         }
678 678
         if (!empty($body))
679
-            $headers .= "Content-length: " . strlen($body) . "\r\n";
679
+            $headers .= "Content-length: ".strlen($body)."\r\n";
680 680
         if (!empty($this->user) || !empty($this->pass))
681
-            $headers .= "Authorization: Basic " . base64_encode($this->user . ":" . $this->pass) . "\r\n";
681
+            $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n";
682 682
 
683 683
         //add proxy auth headers
684 684
         if (!empty($this->proxy_user))
685
-            $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass) . "\r\n";
685
+            $headers .= 'Proxy-Authorization: '.'Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass)."\r\n";
686 686
 
687 687
 
688 688
         $headers .= "\r\n";
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
             socket_set_timeout($fp, $this->read_timeout);
693 693
         $this->timed_out = false;
694 694
 
695
-        fwrite($fp, $headers . $body, strlen($headers . $body));
695
+        fwrite($fp, $headers.$body, strlen($headers.$body));
696 696
 
697 697
         $this->_redirectaddr = false;
698 698
         unset($this->headers);
@@ -716,10 +716,10 @@  discard block
 block discarded – undo
716 716
                 // look for :// in the Location header to see if hostname is included
717 717
                 if (!preg_match("|\:\/\/|", $matches[2])) {
718 718
                     // no host in the path, so prepend
719
-                    $this->_redirectaddr = $URI_PARTS["scheme"] . "://" . $this->host . ":" . $this->port;
719
+                    $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
720 720
                     // eliminate double slash
721 721
                     if (!preg_match("|^/|", $matches[2]))
722
-                        $this->_redirectaddr .= "/" . $matches[2];
722
+                        $this->_redirectaddr .= "/".$matches[2];
723 723
                     else
724 724
                         $this->_redirectaddr .= $matches[2];
725 725
                 } else
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
         if (($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i", $results, $match)) {
772 772
             $this->results[] = $results;
773 773
             for ($x = 0; $x < count($match[1]); $x++)
774
-                $this->_frameurls[] = $this->_expandlinks($match[1][$x], $URI_PARTS["scheme"] . "://" . $this->host);
774
+                $this->_frameurls[] = $this->_expandlinks($match[1][$x], $URI_PARTS["scheme"]."://".$this->host);
775 775
         } // have we already fetched framed content?
776 776
         elseif (is_array($this->results))
777 777
             $this->results[] = $results;
@@ -858,14 +858,14 @@  discard block
 block discarded – undo
858 858
                     $context_opts['ssl']['capath'] = $this->capath;
859 859
             }
860 860
                     
861
-            $host = 'ssl://' . $host;
861
+            $host = 'ssl://'.$host;
862 862
         }
863 863
 
864 864
         $context = stream_context_create($context_opts);
865 865
 
866 866
         if (version_compare(PHP_VERSION, '5.0.0', '>')) {
867
-            if($this->scheme == 'http')
868
-                $host = "tcp://" . $host;
867
+            if ($this->scheme == 'http')
868
+                $host = "tcp://".$host;
869 869
             $fp = stream_socket_client(
870 870
                 "$host:$port",
871 871
                 $errno,
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
                 case -5:
898 898
                     $this->error = "connection refused or timed out (-5)";
899 899
                 default:
900
-                    $this->error = "connection failed (" . $errno . ")";
900
+                    $this->error = "connection failed (".$errno.")";
901 901
             }
902 902
             return false;
903 903
         }
@@ -938,26 +938,26 @@  discard block
 block discarded – undo
938 938
                 while (list($key, $val) = each($formvars)) {
939 939
                     if (is_array($val) || is_object($val)) {
940 940
                         while (list($cur_key, $cur_val) = each($val)) {
941
-                            $postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&";
941
+                            $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
942 942
                         }
943 943
                     } else
944
-                        $postdata .= urlencode($key) . "=" . urlencode($val) . "&";
944
+                        $postdata .= urlencode($key)."=".urlencode($val)."&";
945 945
                 }
946 946
                 break;
947 947
 
948 948
             case "multipart/form-data":
949
-                $this->_mime_boundary = "Snoopy" . md5(uniqid(microtime()));
949
+                $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
950 950
 
951 951
                 reset($formvars);
952 952
                 while (list($key, $val) = each($formvars)) {
953 953
                     if (is_array($val) || is_object($val)) {
954 954
                         while (list($cur_key, $cur_val) = each($val)) {
955
-                            $postdata .= "--" . $this->_mime_boundary . "\r\n";
955
+                            $postdata .= "--".$this->_mime_boundary."\r\n";
956 956
                             $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
957 957
                             $postdata .= "$cur_val\r\n";
958 958
                         }
959 959
                     } else {
960
-                        $postdata .= "--" . $this->_mime_boundary . "\r\n";
960
+                        $postdata .= "--".$this->_mime_boundary."\r\n";
961 961
                         $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
962 962
                         $postdata .= "$val\r\n";
963 963
                     }
@@ -974,12 +974,12 @@  discard block
 block discarded – undo
974 974
                         fclose($fp);
975 975
                         $base_name = basename($file_name);
976 976
 
977
-                        $postdata .= "--" . $this->_mime_boundary . "\r\n";
977
+                        $postdata .= "--".$this->_mime_boundary."\r\n";
978 978
                         $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
979 979
                         $postdata .= "$file_content\r\n";
980 980
                     }
981 981
                 }
982
-                $postdata .= "--" . $this->_mime_boundary . "--\r\n";
982
+                $postdata .= "--".$this->_mime_boundary."--\r\n";
983 983
                 break;
984 984
         }
985 985
 
Please login to merge, or discard this patch.
manager/includes/default_config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$c  = &$settings;
3
+$c = &$settings;
4 4
 
5 5
 $c['site_name']                = 'My MODX Site';
6 6
 $c['site_start']               = 1;
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/POP3.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $username = '',
150 150
         $password = '',
151 151
         $debug_level = 0
152
-    ) {
152
+    ){
153 153
         $pop = new self();
154 154
 
155 155
         return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level);
@@ -288,11 +288,11 @@  discard block
 block discarded – undo
288 288
         }
289 289
 
290 290
         // Send the Username
291
-        $this->sendString("USER $username" . static::LE);
291
+        $this->sendString("USER $username".static::LE);
292 292
         $pop3_response = $this->getResponse();
293 293
         if ($this->checkResponse($pop3_response)) {
294 294
             // Send the Password
295
-            $this->sendString("PASS $password" . static::LE);
295
+            $this->sendString("PASS $password".static::LE);
296 296
             $pop3_response = $this->getResponse();
297 297
             if ($this->checkResponse($pop3_response)) {
298 298
                 return true;
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
     protected function catchWarning($errno, $errstr, $errfile, $errline)
413 413
     {
414 414
         $this->setError(
415
-            'Connecting to the POP3 server raised a PHP warning:' .
415
+            'Connecting to the POP3 server raised a PHP warning:'.
416 416
             "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline"
417 417
         );
418 418
     }
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/OAuth.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,10 +128,10 @@
 block discarded – undo
128 128
         }
129 129
 
130 130
         return base64_encode(
131
-            'user=' .
132
-            $this->oauthUserEmail .
133
-            "\001auth=Bearer " .
134
-            $this->oauthToken .
131
+            'user='.
132
+            $this->oauthUserEmail.
133
+            "\001auth=Bearer ".
134
+            $this->oauthToken.
135 135
             "\001\001"
136 136
         );
137 137
     }
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/SMTP.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         }
308 308
         // Connect to the SMTP server
309 309
         $this->edebug(
310
-            "Connection: opening to $host:$port, timeout=$timeout, options=" .
310
+            "Connection: opening to $host:$port, timeout=$timeout, options=".
311 311
             (count($options) > 0 ? var_export($options, true) : 'array()'),
312 312
             self::DEBUG_CONNECTION
313 313
         );
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $socket_context = stream_context_create($options);
318 318
             set_error_handler([$this, 'errorHandler']);
319 319
             $this->smtp_conn = stream_socket_client(
320
-                $host . ':' . $port,
320
+                $host.':'.$port,
321 321
                 $errno,
322 322
                 $errstr,
323 323
                 $timeout,
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
                 (string) $errstr
351 351
             );
352 352
             $this->edebug(
353
-                'SMTP ERROR: ' . $this->error['error']
353
+                'SMTP ERROR: '.$this->error['error']
354 354
                 . ": $errstr ($errno)",
355 355
                 self::DEBUG_CLIENT
356 356
             );
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         }
371 371
         // Get any announcement
372 372
         $announce = $this->get_lines();
373
-        $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);
373
+        $this->edebug('SERVER -> CLIENT: '.$announce, self::DEBUG_SERVER);
374 374
 
375 375
         return true;
376 376
     }
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
         $password,
427 427
         $authtype = null,
428 428
         $OAuth = null
429
-    ) {
429
+    ){
430 430
         if (!$this->server_caps) {
431 431
             $this->setError('Authentication is not allowed before HELO/EHLO');
432 432
 
@@ -443,15 +443,15 @@  discard block
 block discarded – undo
443 443
                 return false;
444 444
             }
445 445
 
446
-            $this->edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);
446
+            $this->edebug('Auth method requested: '.($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);
447 447
             $this->edebug(
448
-                'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']),
448
+                'Auth methods available on the server: '.implode(',', $this->server_caps['AUTH']),
449 449
                 self::DEBUG_LOWLEVEL
450 450
             );
451 451
 
452 452
             //If we have requested a specific auth type, check the server supports it before trying others
453 453
             if (!in_array($authtype, $this->server_caps['AUTH'])) {
454
-                $this->edebug('Requested auth method not available: ' . $authtype, self::DEBUG_LOWLEVEL);
454
+                $this->edebug('Requested auth method not available: '.$authtype, self::DEBUG_LOWLEVEL);
455 455
                 $authtype = null;
456 456
             }
457 457
 
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 
470 470
                     return false;
471 471
                 }
472
-                self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL);
472
+                self::edebug('Auth method selected: '.$authtype, self::DEBUG_LOWLEVEL);
473 473
             }
474 474
 
475 475
             if (!in_array($authtype, $this->server_caps['AUTH'])) {
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
                 // Send encoded username and password
490 490
                 if (!$this->sendCommand(
491 491
                     'User & Password',
492
-                    base64_encode("\0" . $username . "\0" . $password),
492
+                    base64_encode("\0".$username."\0".$password),
493 493
                     235
494 494
                 )
495 495
                 ) {
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                 $challenge = base64_decode(substr($this->last_reply, 4));
518 518
 
519 519
                 // Build the response
520
-                $response = $username . ' ' . $this->hmac($challenge, $password);
520
+                $response = $username.' '.$this->hmac($challenge, $password);
521 521
 
522 522
                 // send encoded credentials
523 523
                 return $this->sendCommand('Username', base64_encode($response), 235);
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
                 $oauth = $OAuth->getOauth64();
530 530
 
531 531
                 // Start authentication
532
-                if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
532
+                if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 '.$oauth, 235)) {
533 533
                     return false;
534 534
                 }
535 535
                 break;
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
         $k_ipad = $key ^ $ipad;
577 577
         $k_opad = $key ^ $opad;
578 578
 
579
-        return md5($k_opad . pack('H*', md5($k_ipad . $data)));
579
+        return md5($k_opad.pack('H*', md5($k_ipad.$data)));
580 580
     }
581 581
 
582 582
     /**
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
                 }
692 692
                 //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1
693 693
                 if ($in_headers) {
694
-                    $line = "\t" . $line;
694
+                    $line = "\t".$line;
695 695
                 }
696 696
             }
697 697
             $lines_out[] = $line;
@@ -700,9 +700,9 @@  discard block
 block discarded – undo
700 700
             foreach ($lines_out as $line_out) {
701 701
                 //RFC2821 section 4.5.2
702 702
                 if (!empty($line_out) and $line_out[0] == '.') {
703
-                    $line_out = '.' . $line_out;
703
+                    $line_out = '.'.$line_out;
704 704
                 }
705
-                $this->client_send($line_out . static::LE, 'DATA');
705
+                $this->client_send($line_out.static::LE, 'DATA');
706 706
             }
707 707
         }
708 708
 
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
      */
749 749
     protected function sendHello($hello, $host)
750 750
     {
751
-        $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250);
751
+        $noerror = $this->sendCommand($hello, $hello.' '.$host, 250);
752 752
         $this->helo_rply = $this->last_reply;
753 753
         if ($noerror) {
754 754
             $this->parseHelloFields($hello);
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
 
820 820
         return $this->sendCommand(
821 821
             'MAIL FROM',
822
-            'MAIL FROM:<' . $from . '>' . $useVerp,
822
+            'MAIL FROM:<'.$from.'>'.$useVerp,
823 823
             250
824 824
         );
825 825
     }
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
     {
860 860
         return $this->sendCommand(
861 861
             'RCPT TO',
862
-            'RCPT TO:<' . $address . '>',
862
+            'RCPT TO:<'.$address.'>',
863 863
             [250, 251]
864 864
         );
865 865
     }
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
 
899 899
             return false;
900 900
         }
901
-        $this->client_send($commandstring . static::LE, $command);
901
+        $this->client_send($commandstring.static::LE, $command);
902 902
 
903 903
         $this->last_reply = $this->get_lines();
904 904
         // Fetch SMTP code and possible error code explanation
@@ -908,8 +908,8 @@  discard block
 block discarded – undo
908 908
             $code_ex = (count($matches) > 2 ? $matches[2] : null);
909 909
             // Cut off error code from each response line
910 910
             $detail = preg_replace(
911
-                "/{$code}[ -]" .
912
-                ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . '/m',
911
+                "/{$code}[ -]".
912
+                ($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '').'/m',
913 913
                 '',
914 914
                 $this->last_reply
915 915
             );
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
             $detail = substr($this->last_reply, 4);
921 921
         }
922 922
 
923
-        $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
923
+        $this->edebug('SERVER -> CLIENT: '.$this->last_reply, self::DEBUG_SERVER);
924 924
 
925 925
         if (!in_array($code, (array) $expect)) {
926 926
             $this->setError(
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
                 $code_ex
931 931
             );
932 932
             $this->edebug(
933
-                'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply,
933
+                'SMTP ERROR: '.$this->error['error'].': '.$this->last_reply,
934 934
                 self::DEBUG_CLIENT
935 935
             );
936 936
 
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
     public function turn()
997 997
     {
998 998
         $this->setError('The SMTP TURN command is not implemented');
999
-        $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);
999
+        $this->edebug('SMTP NOTICE: '.$this->error['error'], self::DEBUG_CLIENT);
1000 1000
 
1001 1001
         return false;
1002 1002
     }
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
             in_array($command, ['User & Password', 'Username', 'Password'], true)) {
1018 1018
             $this->edebug('CLIENT -> SERVER: <credentials hidden>', self::DEBUG_CLIENT);
1019 1019
         } else {
1020
-            $this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
1020
+            $this->edebug('CLIENT -> SERVER: '.$data, self::DEBUG_CLIENT);
1021 1021
         }
1022 1022
         set_error_handler([$this, 'errorHandler']);
1023 1023
         $result = fwrite($this->smtp_conn, $data);
@@ -1123,14 +1123,14 @@  discard block
 block discarded – undo
1123 1123
             //Must pass vars in here as params are by reference
1124 1124
             if (!stream_select($selR, $selW, $selW, $this->Timelimit)) {
1125 1125
                 $this->edebug(
1126
-                    'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',
1126
+                    'SMTP -> get_lines(): timed-out ('.$this->Timeout.' sec)',
1127 1127
                     self::DEBUG_LOWLEVEL
1128 1128
                 );
1129 1129
                 break;
1130 1130
             }
1131 1131
             //Deliberate noise suppression - errors are handled afterwards
1132 1132
             $str = @fgets($this->smtp_conn, 515);
1133
-            $this->edebug('SMTP INBOUND: "' . trim($str) . '"', self::DEBUG_LOWLEVEL);
1133
+            $this->edebug('SMTP INBOUND: "'.trim($str).'"', self::DEBUG_LOWLEVEL);
1134 1134
             $data .= $str;
1135 1135
             // If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled),
1136 1136
             // or 4th character is a space, we are done reading, break the loop,
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
             $info = stream_get_meta_data($this->smtp_conn);
1143 1143
             if ($info['timed_out']) {
1144 1144
                 $this->edebug(
1145
-                    'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',
1145
+                    'SMTP -> get_lines(): timed-out ('.$this->Timeout.' sec)',
1146 1146
                     self::DEBUG_LOWLEVEL
1147 1147
                 );
1148 1148
                 break;
@@ -1150,8 +1150,8 @@  discard block
 block discarded – undo
1150 1150
             // Now check if reads took too long
1151 1151
             if ($endtime and time() > $endtime) {
1152 1152
                 $this->edebug(
1153
-                    'SMTP -> get_lines(): timelimit reached (' .
1154
-                    $this->Timelimit . ' sec)',
1153
+                    'SMTP -> get_lines(): timelimit reached ('.
1154
+                    $this->Timelimit.' sec)',
1155 1155
                     self::DEBUG_LOWLEVEL
1156 1156
                 );
1157 1157
                 break;
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
      */
35 35
     public function errorMessage()
36 36
     {
37
-        return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
37
+        return '<strong>'.htmlspecialchars($this->getMessage())."</strong><br />\n";
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/PHPMailer.php 1 patch
Spacing   +135 added lines, -136 removed lines patch added patch discarded remove patch
@@ -1076,10 +1076,10 @@  discard block
 block discarded – undo
1076 1076
             $list = imap_rfc822_parse_adrlist($addrstr, '');
1077 1077
             foreach ($list as $address) {
1078 1078
                 if ('.SYNTAX-ERROR.' != $address->host) {
1079
-                    if (static::validateAddress($address->mailbox . '@' . $address->host)) {
1079
+                    if (static::validateAddress($address->mailbox.'@'.$address->host)) {
1080 1080
                         $addresses[] = [
1081 1081
                             'name' => (property_exists($address, 'personal') ? $address->personal : ''),
1082
-                            'address' => $address->mailbox . '@' . $address->host,
1082
+                            'address' => $address->mailbox.'@'.$address->host,
1083 1083
                         ];
1084 1084
                     }
1085 1085
                 }
@@ -1225,14 +1225,14 @@  discard block
 block discarded – undo
1225 1225
                  * Feel free to use and redistribute this code. But please keep this copyright notice.
1226 1226
                  */
1227 1227
                 return (bool) preg_match(
1228
-                    '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' .
1229
-                    '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' .
1230
-                    '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' .
1231
-                    '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' .
1232
-                    '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .
1233
-                    '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .
1234
-                    '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .
1235
-                    '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
1228
+                    '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)'.
1229
+                    '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)'.
1230
+                    '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)'.
1231
+                    '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*'.
1232
+                    '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)'.
1233
+                    '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}'.
1234
+                    '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:'.
1235
+                    '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}'.
1236 1236
                     '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD',
1237 1237
                     $address
1238 1238
                 );
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
                  * @see http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
1244 1244
                  */
1245 1245
                 return (bool) preg_match(
1246
-                    '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .
1246
+                    '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}'.
1247 1247
                     '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',
1248 1248
                     $address
1249 1249
                 );
@@ -1294,7 +1294,7 @@  discard block
 block discarded – undo
1294 1294
                 $errorcode = 0;
1295 1295
                 $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46);
1296 1296
                 if (false !== $punycode) {
1297
-                    return substr($address, 0, $pos) . $punycode;
1297
+                    return substr($address, 0, $pos).$punycode;
1298 1298
                 }
1299 1299
             }
1300 1300
         }
@@ -1358,8 +1358,8 @@  discard block
 block discarded – undo
1358 1358
                     and version_compare(PHP_VERSION, '7.1.3', '<')))
1359 1359
         ) {
1360 1360
             trigger_error(
1361
-                'Your version of PHP is affected by a bug that may result in corrupted messages.' .
1362
-                ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' .
1361
+                'Your version of PHP is affected by a bug that may result in corrupted messages.'.
1362
+                ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in'.
1363 1363
                 ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.',
1364 1364
                 E_USER_WARNING
1365 1365
             );
@@ -1443,12 +1443,12 @@  discard block
 block discarded – undo
1443 1443
                 )
1444 1444
             ) {
1445 1445
                 $header_dkim = $this->DKIM_Add(
1446
-                    $this->MIMEHeader . $this->mailHeader,
1446
+                    $this->MIMEHeader.$this->mailHeader,
1447 1447
                     $this->encodeHeader($this->secureHeader($this->Subject)),
1448 1448
                     $this->MIMEBody
1449 1449
                 );
1450
-                $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . static::$LE .
1451
-                    static::normalizeBreaks($header_dkim) . static::$LE;
1450
+                $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ").static::$LE.
1451
+                    static::normalizeBreaks($header_dkim).static::$LE;
1452 1452
             }
1453 1453
 
1454 1454
             return true;
@@ -1482,7 +1482,7 @@  discard block
 block discarded – undo
1482 1482
                 case 'mail':
1483 1483
                     return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
1484 1484
                 default:
1485
-                    $sendMethod = $this->Mailer . 'Send';
1485
+                    $sendMethod = $this->Mailer.'Send';
1486 1486
                     if (method_exists($this, $sendMethod)) {
1487 1487
                         return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
1488 1488
                     }
@@ -1535,9 +1535,9 @@  discard block
 block discarded – undo
1535 1535
             foreach ($this->SingleToArray as $toAddr) {
1536 1536
                 $mail = @popen($sendmail, 'w');
1537 1537
                 if (!$mail) {
1538
-                    throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1538
+                    throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1539 1539
                 }
1540
-                fwrite($mail, 'To: ' . $toAddr . "\n");
1540
+                fwrite($mail, 'To: '.$toAddr."\n");
1541 1541
                 fwrite($mail, $header);
1542 1542
                 fwrite($mail, $body);
1543 1543
                 $result = pclose($mail);
@@ -1552,13 +1552,13 @@  discard block
 block discarded – undo
1552 1552
                     []
1553 1553
                 );
1554 1554
                 if (0 !== $result) {
1555
-                    throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1555
+                    throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1556 1556
                 }
1557 1557
             }
1558 1558
         } else {
1559 1559
             $mail = @popen($sendmail, 'w');
1560 1560
             if (!$mail) {
1561
-                throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1561
+                throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1562 1562
             }
1563 1563
             fwrite($mail, $header);
1564 1564
             fwrite($mail, $body);
@@ -1574,7 +1574,7 @@  discard block
 block discarded – undo
1574 1574
                 []
1575 1575
             );
1576 1576
             if (0 !== $result) {
1577
-                throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1577
+                throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1578 1578
             }
1579 1579
         }
1580 1580
 
@@ -1732,7 +1732,7 @@  discard block
 block discarded – undo
1732 1732
             $smtp_from = $this->Sender;
1733 1733
         }
1734 1734
         if (!$this->smtp->mail($smtp_from)) {
1735
-            $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
1735
+            $this->setError($this->lang('from_failed').$smtp_from.' : '.implode(',', $this->smtp->getError()));
1736 1736
             throw new Exception($this->ErrorInfo, self::STOP_CRITICAL);
1737 1737
         }
1738 1738
 
@@ -1753,7 +1753,7 @@  discard block
 block discarded – undo
1753 1753
         }
1754 1754
 
1755 1755
         // Only send the DATA command if we have viable recipients
1756
-        if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) {
1756
+        if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header.$body)) {
1757 1757
             throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL);
1758 1758
         }
1759 1759
 
@@ -1783,10 +1783,10 @@  discard block
 block discarded – undo
1783 1783
         if (count($bad_rcpt) > 0) {
1784 1784
             $errstr = '';
1785 1785
             foreach ($bad_rcpt as $bad) {
1786
-                $errstr .= $bad['to'] . ': ' . $bad['error'];
1786
+                $errstr .= $bad['to'].': '.$bad['error'];
1787 1787
             }
1788 1788
             throw new Exception(
1789
-                $this->lang('recipients_failed') . $errstr,
1789
+                $this->lang('recipients_failed').$errstr,
1790 1790
                 self::STOP_CONTINUE
1791 1791
             );
1792 1792
         }
@@ -1836,7 +1836,7 @@  discard block
 block discarded – undo
1836 1836
                 trim($hostentry),
1837 1837
                 $hostinfo
1838 1838
             )) {
1839
-                static::edebug($this->lang('connect_host') . ' ' . $hostentry);
1839
+                static::edebug($this->lang('connect_host').' '.$hostentry);
1840 1840
                 // Not a valid host entry
1841 1841
                 continue;
1842 1842
             }
@@ -1848,7 +1848,7 @@  discard block
 block discarded – undo
1848 1848
 
1849 1849
             //Check the host name is a valid name or IP address before trying to use it
1850 1850
             if (!static::isValidHost($hostinfo[3])) {
1851
-                static::edebug($this->lang('connect_host') . ' ' . $hostentry);
1851
+                static::edebug($this->lang('connect_host').' '.$hostentry);
1852 1852
                 continue;
1853 1853
             }
1854 1854
             $prefix = '';
@@ -1868,7 +1868,7 @@  discard block
 block discarded – undo
1868 1868
             if ('tls' === $secure or 'ssl' === $secure) {
1869 1869
                 //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled
1870 1870
                 if (!$sslext) {
1871
-                    throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL);
1871
+                    throw new Exception($this->lang('extension_missing').'openssl', self::STOP_CRITICAL);
1872 1872
                 }
1873 1873
             }
1874 1874
             $host = $hostinfo[3];
@@ -1877,7 +1877,7 @@  discard block
 block discarded – undo
1877 1877
             if ($tport > 0 and $tport < 65536) {
1878 1878
                 $port = $tport;
1879 1879
             }
1880
-            if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) {
1880
+            if ($this->smtp->connect($prefix.$host, $port, $this->Timeout, $options)) {
1881 1881
                 try {
1882 1882
                     if ($this->Helo) {
1883 1883
                         $hello = $this->Helo;
@@ -1994,14 +1994,14 @@  discard block
 block discarded – undo
1994 1994
         ];
1995 1995
         if (empty($lang_path)) {
1996 1996
             // Calculate an absolute path so it can work if CWD is not here
1997
-            $lang_path = __DIR__ . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
1997
+            $lang_path = __DIR__.DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR;
1998 1998
         }
1999 1999
         //Validate $langcode
2000 2000
         if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
2001 2001
             $langcode = 'en';
2002 2002
         }
2003 2003
         $foundlang = true;
2004
-        $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
2004
+        $lang_file = $lang_path.'phpmailer.lang-'.$langcode.'.php';
2005 2005
         // There is no English translation file
2006 2006
         if ('en' != $langcode) {
2007 2007
             // Make sure language file path is readable
@@ -2046,7 +2046,7 @@  discard block
 block discarded – undo
2046 2046
             $addresses[] = $this->addrFormat($address);
2047 2047
         }
2048 2048
 
2049
-        return $type . ': ' . implode(', ', $addresses) . static::$LE;
2049
+        return $type.': '.implode(', ', $addresses).static::$LE;
2050 2050
     }
2051 2051
 
2052 2052
     /**
@@ -2063,9 +2063,9 @@  discard block
 block discarded – undo
2063 2063
             return $this->secureHeader($addr[0]);
2064 2064
         }
2065 2065
 
2066
-        return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader(
2066
+        return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase').' <'.$this->secureHeader(
2067 2067
                 $addr[0]
2068
-            ) . '>';
2068
+            ).'>';
2069 2069
     }
2070 2070
 
2071 2071
     /**
@@ -2122,10 +2122,10 @@  discard block
 block discarded – undo
2122 2122
                             }
2123 2123
                             $part = substr($word, 0, $len);
2124 2124
                             $word = substr($word, $len);
2125
-                            $buf .= ' ' . $part;
2126
-                            $message .= $buf . sprintf('=%s', static::$LE);
2125
+                            $buf .= ' '.$part;
2126
+                            $message .= $buf.sprintf('=%s', static::$LE);
2127 2127
                         } else {
2128
-                            $message .= $buf . $soft_break;
2128
+                            $message .= $buf.$soft_break;
2129 2129
                         }
2130 2130
                         $buf = '';
2131 2131
                     }
@@ -2145,7 +2145,7 @@  discard block
 block discarded – undo
2145 2145
                         $word = substr($word, $len);
2146 2146
 
2147 2147
                         if (strlen($word) > 0) {
2148
-                            $message .= $part . sprintf('=%s', static::$LE);
2148
+                            $message .= $part.sprintf('=%s', static::$LE);
2149 2149
                         } else {
2150 2150
                             $buf = $part;
2151 2151
                         }
@@ -2158,13 +2158,13 @@  discard block
 block discarded – undo
2158 2158
                     $buf .= $word;
2159 2159
 
2160 2160
                     if (strlen($buf) > $length and '' != $buf_o) {
2161
-                        $message .= $buf_o . $soft_break;
2161
+                        $message .= $buf_o.$soft_break;
2162 2162
                         $buf = $word;
2163 2163
                     }
2164 2164
                 }
2165 2165
                 $firstword = false;
2166 2166
             }
2167
-            $message .= $buf . static::$LE;
2167
+            $message .= $buf.static::$LE;
2168 2168
         }
2169 2169
 
2170 2170
         return $message;
@@ -2310,7 +2310,7 @@  discard block
 block discarded – undo
2310 2310
         if ('' == $this->XMailer) {
2311 2311
             $result .= $this->headerLine(
2312 2312
                 'X-Mailer',
2313
-                'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)'
2313
+                'PHPMailer '.self::VERSION.' (https://github.com/PHPMailer/PHPMailer)'
2314 2314
             );
2315 2315
         } else {
2316 2316
             $myXmailer = trim($this->XMailer);
@@ -2320,7 +2320,7 @@  discard block
 block discarded – undo
2320 2320
         }
2321 2321
 
2322 2322
         if ('' != $this->ConfirmReadingTo) {
2323
-            $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>');
2323
+            $result .= $this->headerLine('Disposition-Notification-To', '<'.$this->ConfirmReadingTo.'>');
2324 2324
         }
2325 2325
 
2326 2326
         // Add custom headers
@@ -2350,23 +2350,23 @@  discard block
 block discarded – undo
2350 2350
         switch ($this->message_type) {
2351 2351
             case 'inline':
2352 2352
                 $result .= $this->headerLine('Content-Type', 'multipart/related;');
2353
-                $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"');
2353
+                $result .= $this->textLine("\tboundary=\"".$this->boundary[1].'"');
2354 2354
                 break;
2355 2355
             case 'attach':
2356 2356
             case 'inline_attach':
2357 2357
             case 'alt_attach':
2358 2358
             case 'alt_inline_attach':
2359 2359
                 $result .= $this->headerLine('Content-Type', 'multipart/mixed;');
2360
-                $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"');
2360
+                $result .= $this->textLine("\tboundary=\"".$this->boundary[1].'"');
2361 2361
                 break;
2362 2362
             case 'alt':
2363 2363
             case 'alt_inline':
2364 2364
                 $result .= $this->headerLine('Content-Type', 'multipart/alternative;');
2365
-                $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"');
2365
+                $result .= $this->textLine("\tboundary=\"".$this->boundary[1].'"');
2366 2366
                 break;
2367 2367
             default:
2368 2368
                 // Catches case 'plain': and case '':
2369
-                $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet);
2369
+                $result .= $this->textLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet);
2370 2370
                 $ismultipart = false;
2371 2371
                 break;
2372 2372
         }
@@ -2401,7 +2401,7 @@  discard block
 block discarded – undo
2401 2401
      */
2402 2402
     public function getSentMIMEMessage()
2403 2403
     {
2404
-        return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . static::$LE . static::$LE . $this->MIMEBody;
2404
+        return rtrim($this->MIMEHeader.$this->mailHeader, "\n\r").static::$LE.static::$LE.$this->MIMEBody;
2405 2405
     }
2406 2406
 
2407 2407
     /**
@@ -2438,12 +2438,12 @@  discard block
 block discarded – undo
2438 2438
         $body = '';
2439 2439
         //Create unique IDs and preset boundaries
2440 2440
         $this->uniqueid = $this->generateId();
2441
-        $this->boundary[1] = 'b1_' . $this->uniqueid;
2442
-        $this->boundary[2] = 'b2_' . $this->uniqueid;
2443
-        $this->boundary[3] = 'b3_' . $this->uniqueid;
2441
+        $this->boundary[1] = 'b1_'.$this->uniqueid;
2442
+        $this->boundary[2] = 'b2_'.$this->uniqueid;
2443
+        $this->boundary[3] = 'b3_'.$this->uniqueid;
2444 2444
 
2445 2445
         if ($this->sign_key_file) {
2446
-            $body .= $this->getMailMIME() . static::$LE;
2446
+            $body .= $this->getMailMIME().static::$LE;
2447 2447
         }
2448 2448
 
2449 2449
         $this->setWordWrap();
@@ -2476,7 +2476,7 @@  discard block
 block discarded – undo
2476 2476
             $altBodyEncoding = 'quoted-printable';
2477 2477
         }
2478 2478
         //Use this as a preamble in all multipart message types
2479
-        $mimepre = 'This is a multi-part message in MIME format.' . static::$LE;
2479
+        $mimepre = 'This is a multi-part message in MIME format.'.static::$LE;
2480 2480
         switch ($this->message_type) {
2481 2481
             case 'inline':
2482 2482
                 $body .= $mimepre;
@@ -2494,9 +2494,9 @@  discard block
 block discarded – undo
2494 2494
                 break;
2495 2495
             case 'inline_attach':
2496 2496
                 $body .= $mimepre;
2497
-                $body .= $this->textLine('--' . $this->boundary[1]);
2497
+                $body .= $this->textLine('--'.$this->boundary[1]);
2498 2498
                 $body .= $this->headerLine('Content-Type', 'multipart/related;');
2499
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2499
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2500 2500
                 $body .= static::$LE;
2501 2501
                 $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding);
2502 2502
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
@@ -2525,9 +2525,9 @@  discard block
 block discarded – undo
2525 2525
                 $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding);
2526 2526
                 $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
2527 2527
                 $body .= static::$LE;
2528
-                $body .= $this->textLine('--' . $this->boundary[1]);
2528
+                $body .= $this->textLine('--'.$this->boundary[1]);
2529 2529
                 $body .= $this->headerLine('Content-Type', 'multipart/related;');
2530
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2530
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2531 2531
                 $body .= static::$LE;
2532 2532
                 $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding);
2533 2533
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
@@ -2538,9 +2538,9 @@  discard block
 block discarded – undo
2538 2538
                 break;
2539 2539
             case 'alt_attach':
2540 2540
                 $body .= $mimepre;
2541
-                $body .= $this->textLine('--' . $this->boundary[1]);
2541
+                $body .= $this->textLine('--'.$this->boundary[1]);
2542 2542
                 $body .= $this->headerLine('Content-Type', 'multipart/alternative;');
2543
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2543
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2544 2544
                 $body .= static::$LE;
2545 2545
                 $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding);
2546 2546
                 $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
@@ -2558,16 +2558,16 @@  discard block
 block discarded – undo
2558 2558
                 break;
2559 2559
             case 'alt_inline_attach':
2560 2560
                 $body .= $mimepre;
2561
-                $body .= $this->textLine('--' . $this->boundary[1]);
2561
+                $body .= $this->textLine('--'.$this->boundary[1]);
2562 2562
                 $body .= $this->headerLine('Content-Type', 'multipart/alternative;');
2563
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2563
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2564 2564
                 $body .= static::$LE;
2565 2565
                 $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding);
2566 2566
                 $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
2567 2567
                 $body .= static::$LE;
2568
-                $body .= $this->textLine('--' . $this->boundary[2]);
2568
+                $body .= $this->textLine('--'.$this->boundary[2]);
2569 2569
                 $body .= $this->headerLine('Content-Type', 'multipart/related;');
2570
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"');
2570
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[3].'"');
2571 2571
                 $body .= static::$LE;
2572 2572
                 $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding);
2573 2573
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
@@ -2594,12 +2594,12 @@  discard block
 block discarded – undo
2594 2594
         } elseif ($this->sign_key_file) {
2595 2595
             try {
2596 2596
                 if (!defined('PKCS7_TEXT')) {
2597
-                    throw new Exception($this->lang('extension_missing') . 'openssl');
2597
+                    throw new Exception($this->lang('extension_missing').'openssl');
2598 2598
                 }
2599 2599
                 // @TODO would be nice to use php://temp streams here
2600 2600
                 $file = tempnam(sys_get_temp_dir(), 'mail');
2601 2601
                 if (false === file_put_contents($file, $body)) {
2602
-                    throw new Exception($this->lang('signing') . ' Could not write temp file');
2602
+                    throw new Exception($this->lang('signing').' Could not write temp file');
2603 2603
                 }
2604 2604
                 $signed = tempnam(sys_get_temp_dir(), 'signed');
2605 2605
                 //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197
@@ -2607,16 +2607,16 @@  discard block
 block discarded – undo
2607 2607
                     $sign = @openssl_pkcs7_sign(
2608 2608
                         $file,
2609 2609
                         $signed,
2610
-                        'file://' . realpath($this->sign_cert_file),
2611
-                        ['file://' . realpath($this->sign_key_file), $this->sign_key_pass],
2610
+                        'file://'.realpath($this->sign_cert_file),
2611
+                        ['file://'.realpath($this->sign_key_file), $this->sign_key_pass],
2612 2612
                         []
2613 2613
                     );
2614 2614
                 } else {
2615 2615
                     $sign = @openssl_pkcs7_sign(
2616 2616
                         $file,
2617 2617
                         $signed,
2618
-                        'file://' . realpath($this->sign_cert_file),
2619
-                        ['file://' . realpath($this->sign_key_file), $this->sign_key_pass],
2618
+                        'file://'.realpath($this->sign_cert_file),
2619
+                        ['file://'.realpath($this->sign_key_file), $this->sign_key_pass],
2620 2620
                         [],
2621 2621
                         PKCS7_DETACHED,
2622 2622
                         $this->sign_extracerts_file
@@ -2628,11 +2628,11 @@  discard block
 block discarded – undo
2628 2628
                     @unlink($signed);
2629 2629
                     //The message returned by openssl contains both headers and body, so need to split them up
2630 2630
                     $parts = explode("\n\n", $body, 2);
2631
-                    $this->MIMEHeader .= $parts[0] . static::$LE . static::$LE;
2631
+                    $this->MIMEHeader .= $parts[0].static::$LE.static::$LE;
2632 2632
                     $body = $parts[1];
2633 2633
                 } else {
2634 2634
                     @unlink($signed);
2635
-                    throw new Exception($this->lang('signing') . openssl_error_string());
2635
+                    throw new Exception($this->lang('signing').openssl_error_string());
2636 2636
                 }
2637 2637
             } catch (Exception $exc) {
2638 2638
                 $body = '';
@@ -2667,7 +2667,7 @@  discard block
 block discarded – undo
2667 2667
         if ('' == $encoding) {
2668 2668
             $encoding = $this->Encoding;
2669 2669
         }
2670
-        $result .= $this->textLine('--' . $boundary);
2670
+        $result .= $this->textLine('--'.$boundary);
2671 2671
         $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet);
2672 2672
         $result .= static::$LE;
2673 2673
         // RFC1341 part 5 says 7bit is assumed if not specified
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
      */
2689 2689
     protected function endBoundary($boundary)
2690 2690
     {
2691
-        return static::$LE . '--' . $boundary . '--' . static::$LE;
2691
+        return static::$LE.'--'.$boundary.'--'.static::$LE;
2692 2692
     }
2693 2693
 
2694 2694
     /**
@@ -2724,7 +2724,7 @@  discard block
 block discarded – undo
2724 2724
      */
2725 2725
     public function headerLine($name, $value)
2726 2726
     {
2727
-        return $name . ': ' . $value . static::$LE;
2727
+        return $name.': '.$value.static::$LE;
2728 2728
     }
2729 2729
 
2730 2730
     /**
@@ -2736,7 +2736,7 @@  discard block
 block discarded – undo
2736 2736
      */
2737 2737
     public function textLine($value)
2738 2738
     {
2739
-        return $value . static::$LE;
2739
+        return $value.static::$LE;
2740 2740
     }
2741 2741
 
2742 2742
     /**
@@ -2758,7 +2758,7 @@  discard block
 block discarded – undo
2758 2758
     {
2759 2759
         try {
2760 2760
             if (!@is_file($path)) {
2761
-                throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
2761
+                throw new Exception($this->lang('file_access').$path, self::STOP_CONTINUE);
2762 2762
             }
2763 2763
 
2764 2764
             // If a MIME type is not specified, try to work it out from the file name
@@ -2885,7 +2885,7 @@  discard block
 block discarded – undo
2885 2885
                             'Content-Disposition: %s; filename="%s"%s',
2886 2886
                             $disposition,
2887 2887
                             $encoded_name,
2888
-                            static::$LE . static::$LE
2888
+                            static::$LE.static::$LE
2889 2889
                         );
2890 2890
                     } else {
2891 2891
                         if (!empty($encoded_name)) {
@@ -2893,13 +2893,13 @@  discard block
 block discarded – undo
2893 2893
                                 'Content-Disposition: %s; filename=%s%s',
2894 2894
                                 $disposition,
2895 2895
                                 $encoded_name,
2896
-                                static::$LE . static::$LE
2896
+                                static::$LE.static::$LE
2897 2897
                             );
2898 2898
                         } else {
2899 2899
                             $mime[] = sprintf(
2900 2900
                                 'Content-Disposition: %s%s',
2901 2901
                                 $disposition,
2902
-                                static::$LE . static::$LE
2902
+                                static::$LE.static::$LE
2903 2903
                             );
2904 2904
                         }
2905 2905
                     }
@@ -2940,11 +2940,11 @@  discard block
 block discarded – undo
2940 2940
     {
2941 2941
         try {
2942 2942
             if (!file_exists($path)) {
2943
-                throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
2943
+                throw new Exception($this->lang('file_open').$path, self::STOP_CONTINUE);
2944 2944
             }
2945 2945
             $file_buffer = file_get_contents($path);
2946 2946
             if (false === $file_buffer) {
2947
-                throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
2947
+                throw new Exception($this->lang('file_open').$path, self::STOP_CONTINUE);
2948 2948
             }
2949 2949
             $file_buffer = $this->encodeString($file_buffer, $encoding);
2950 2950
 
@@ -2991,7 +2991,7 @@  discard block
 block discarded – undo
2991 2991
                 $encoded = $this->encodeQP($str);
2992 2992
                 break;
2993 2993
             default:
2994
-                $this->setError($this->lang('encoding') . $encoding);
2994
+                $this->setError($this->lang('encoding').$encoding);
2995 2995
                 break;
2996 2996
         }
2997 2997
 
@@ -3057,7 +3057,7 @@  discard block
 block discarded – undo
3057 3057
                 $maxlen -= $maxlen % 4;
3058 3058
                 $encoded = trim(chunk_split($encoded, $maxlen, "\n"));
3059 3059
             }
3060
-            $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded);
3060
+            $encoded = preg_replace('/^(.*)$/m', ' =?'.$this->CharSet."?$encoding?\\1?=", $encoded);
3061 3061
         } elseif ($matchcount > 0) {
3062 3062
             //1 or more chars need encoding, use Q-encode
3063 3063
             $encoding = 'Q';
@@ -3065,8 +3065,8 @@  discard block
 block discarded – undo
3065 3065
             $maxlen = static::STD_LINE_LENGTH - $lengthsub - 8 - strlen($this->CharSet);
3066 3066
             $encoded = $this->encodeQ($str, $position);
3067 3067
             $encoded = $this->wrapText($encoded, $maxlen, true);
3068
-            $encoded = str_replace('=' . static::$LE, "\n", trim($encoded));
3069
-            $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded);
3068
+            $encoded = str_replace('='.static::$LE, "\n", trim($encoded));
3069
+            $encoded = preg_replace('/^(.*)$/m', ' =?'.$this->CharSet."?$encoding?\\1?=", $encoded);
3070 3070
         } elseif (strlen($str) > $maxlen) {
3071 3071
             //No chars need encoding, but line is too long, so fold it
3072 3072
             $encoded = trim($this->wrapText($str, $maxlen, false));
@@ -3127,7 +3127,7 @@  discard block
 block discarded – undo
3127 3127
      */
3128 3128
     public function base64EncodeWrapMB($str, $linebreak = null)
3129 3129
     {
3130
-        $start = '=?' . $this->CharSet . '?B?';
3130
+        $start = '=?'.$this->CharSet.'?B?';
3131 3131
         $end = '?=';
3132 3132
         $encoded = '';
3133 3133
         if (null === $linebreak) {
@@ -3150,7 +3150,7 @@  discard block
 block discarded – undo
3150 3150
                 $chunk = base64_encode($chunk);
3151 3151
                 ++$lookBack;
3152 3152
             } while (strlen($chunk) > $length);
3153
-            $encoded .= $chunk . $linebreak;
3153
+            $encoded .= $chunk.$linebreak;
3154 3154
         }
3155 3155
 
3156 3156
         // Chomp the last linefeed
@@ -3203,7 +3203,7 @@  discard block
 block discarded – undo
3203 3203
                 // RFC 2047 section 5.1
3204 3204
                 // Replace every high ascii, control, =, ? and _ characters
3205 3205
                 /** @noinspection SuspiciousAssignmentsInspection */
3206
-                $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern;
3206
+                $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377'.$pattern;
3207 3207
                 break;
3208 3208
         }
3209 3209
         $matches = [];
@@ -3216,7 +3216,7 @@  discard block
 block discarded – undo
3216 3216
                 array_unshift($matches[0], '=');
3217 3217
             }
3218 3218
             foreach (array_unique($matches[0]) as $char) {
3219
-                $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);
3219
+                $encoded = str_replace($char, '='.sprintf('%02X', ord($char)), $encoded);
3220 3220
             }
3221 3221
         }
3222 3222
         // Replace spaces with _ (more readable than =20)
@@ -3241,7 +3241,7 @@  discard block
 block discarded – undo
3241 3241
         $encoding = 'base64',
3242 3242
         $type = '',
3243 3243
         $disposition = 'attachment'
3244
-    ) {
3244
+    ){
3245 3245
         // If a MIME type is not specified, try to work it out from the file name
3246 3246
         if ('' == $type) {
3247 3247
             $type = static::filenameToType($filename);
@@ -3281,7 +3281,7 @@  discard block
 block discarded – undo
3281 3281
     public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')
3282 3282
     {
3283 3283
         if (!@is_file($path)) {
3284
-            $this->setError($this->lang('file_access') . $path);
3284
+            $this->setError($this->lang('file_access').$path);
3285 3285
 
3286 3286
             return false;
3287 3287
         }
@@ -3335,7 +3335,7 @@  discard block
 block discarded – undo
3335 3335
         $encoding = 'base64',
3336 3336
         $type = '',
3337 3337
         $disposition = 'inline'
3338
-    ) {
3338
+    ){
3339 3339
         // If a MIME type is not specified, try to work it out from the name
3340 3340
         if ('' == $type and !empty($name)) {
3341 3341
             $type = static::filenameToType($name);
@@ -3425,7 +3425,7 @@  discard block
 block discarded – undo
3425 3425
     {
3426 3426
         $this->RecipientsQueue = array_filter(
3427 3427
             $this->RecipientsQueue,
3428
-            function ($params) use ($kind) {
3428
+            function($params) use ($kind) {
3429 3429
                 return $params[0] != $kind;
3430 3430
             }
3431 3431
         );
@@ -3515,15 +3515,15 @@  discard block
 block discarded – undo
3515 3515
         if ('smtp' == $this->Mailer and null !== $this->smtp) {
3516 3516
             $lasterror = $this->smtp->getError();
3517 3517
             if (!empty($lasterror['error'])) {
3518
-                $msg .= $this->lang('smtp_error') . $lasterror['error'];
3518
+                $msg .= $this->lang('smtp_error').$lasterror['error'];
3519 3519
                 if (!empty($lasterror['detail'])) {
3520
-                    $msg .= ' Detail: ' . $lasterror['detail'];
3520
+                    $msg .= ' Detail: '.$lasterror['detail'];
3521 3521
                 }
3522 3522
                 if (!empty($lasterror['smtp_code'])) {
3523
-                    $msg .= ' SMTP code: ' . $lasterror['smtp_code'];
3523
+                    $msg .= ' SMTP code: '.$lasterror['smtp_code'];
3524 3524
                 }
3525 3525
                 if (!empty($lasterror['smtp_code_ex'])) {
3526
-                    $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex'];
3526
+                    $msg .= ' Additional SMTP info: '.$lasterror['smtp_code_ex'];
3527 3527
                 }
3528 3528
             }
3529 3529
         }
@@ -3596,7 +3596,7 @@  discard block
 block discarded – undo
3596 3596
             //Is it a valid IPv4 address?
3597 3597
             return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
3598 3598
         }
3599
-        if (filter_var('http://' . $host, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED)) {
3599
+        if (filter_var('http://'.$host, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED)) {
3600 3600
             //Is it a syntactically valid hostname?
3601 3601
             return true;
3602 3602
         }
@@ -3622,7 +3622,7 @@  discard block
 block discarded – undo
3622 3622
                 //Include a link to troubleshooting docs on SMTP connection failure
3623 3623
                 //this is by far the biggest cause of support questions
3624 3624
                 //but it's usually not PHPMailer's fault.
3625
-                return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
3625
+                return $this->language[$key].' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
3626 3626
             }
3627 3627
 
3628 3628
             return $this->language[$key];
@@ -3710,14 +3710,14 @@  discard block
 block discarded – undo
3710 3710
                     }
3711 3711
                     //Hash the decoded data, not the URL so that the same data-URI image used in multiple places
3712 3712
                     //will only be embedded once, even if it used a different encoding
3713
-                    $cid = hash('sha256', $data) . '@phpmailer.0'; // RFC2392 S 2
3713
+                    $cid = hash('sha256', $data).'@phpmailer.0'; // RFC2392 S 2
3714 3714
 
3715 3715
                     if (!$this->cidExists($cid)) {
3716
-                        $this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1]);
3716
+                        $this->addStringEmbeddedImage($data, $cid, 'embed'.$imgindex, 'base64', $match[1]);
3717 3717
                     }
3718 3718
                     $message = str_replace(
3719 3719
                         $images[0][$imgindex],
3720
-                        $images[1][$imgindex] . '="cid:' . $cid . '"',
3720
+                        $images[1][$imgindex].'="cid:'.$cid.'"',
3721 3721
                         $message
3722 3722
                     );
3723 3723
                     continue;
@@ -3736,7 +3736,7 @@  discard block
 block discarded – undo
3736 3736
                     if ('.' == $directory) {
3737 3737
                         $directory = '';
3738 3738
                     }
3739
-                    $cid = hash('sha256', $url) . '@phpmailer.0'; // RFC2392 S 2
3739
+                    $cid = hash('sha256', $url).'@phpmailer.0'; // RFC2392 S 2
3740 3740
                     if (strlen($basedir) > 1 and '/' != substr($basedir, -1)) {
3741 3741
                         $basedir .= '/';
3742 3742
                     }
@@ -3744,7 +3744,7 @@  discard block
 block discarded – undo
3744 3744
                         $directory .= '/';
3745 3745
                     }
3746 3746
                     if ($this->addEmbeddedImage(
3747
-                        $basedir . $directory . $filename,
3747
+                        $basedir.$directory.$filename,
3748 3748
                         $cid,
3749 3749
                         $filename,
3750 3750
                         'base64',
@@ -3752,8 +3752,8 @@  discard block
 block discarded – undo
3752 3752
                     )
3753 3753
                     ) {
3754 3754
                         $message = preg_replace(
3755
-                            '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui',
3756
-                            $images[1][$imgindex] . '="cid:' . $cid . '"',
3755
+                            '/'.$images[1][$imgindex].'=["\']'.preg_quote($url, '/').'["\']/Ui',
3756
+                            $images[1][$imgindex].'="cid:'.$cid.'"',
3757 3757
                             $message
3758 3758
                         );
3759 3759
                     }
@@ -4027,7 +4027,7 @@  discard block
 block discarded – undo
4027 4027
 
4028 4028
             return true;
4029 4029
         }
4030
-        $this->setError($this->lang('variable_set') . $name);
4030
+        $this->setError($this->lang('variable_set').$name);
4031 4031
 
4032 4032
         return false;
4033 4033
     }
@@ -4121,7 +4121,7 @@  discard block
 block discarded – undo
4121 4121
             if (((0x21 <= $ord) and ($ord <= 0x3A)) or $ord == 0x3C or ((0x3E <= $ord) and ($ord <= 0x7E))) {
4122 4122
                 $line .= $txt[$i];
4123 4123
             } else {
4124
-                $line .= '=' . sprintf('%02X', $ord);
4124
+                $line .= '='.sprintf('%02X', $ord);
4125 4125
             }
4126 4126
         }
4127 4127
 
@@ -4141,14 +4141,13 @@  discard block
 block discarded – undo
4141 4141
     {
4142 4142
         if (!defined('PKCS7_TEXT')) {
4143 4143
             if ($this->exceptions) {
4144
-                throw new Exception($this->lang('extension_missing') . 'openssl');
4144
+                throw new Exception($this->lang('extension_missing').'openssl');
4145 4145
             }
4146 4146
 
4147 4147
             return '';
4148 4148
         }
4149 4149
         $privKeyStr = !empty($this->DKIM_private_string) ?
4150
-            $this->DKIM_private_string :
4151
-            file_get_contents($this->DKIM_private);
4150
+            $this->DKIM_private_string : file_get_contents($this->DKIM_private);
4152 4151
         if ('' != $this->DKIM_passphrase) {
4153 4152
             $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
4154 4153
         } else {
@@ -4200,7 +4199,7 @@  discard block
 block discarded – undo
4200 4199
             //But then says to delete space before and after the colon.
4201 4200
             //Net result is the same as trimming both ends of the value.
4202 4201
             //by elimination, the same applies to the field name
4203
-            $lines[$key] = trim($heading, " \t") . ':' . trim($value, " \t");
4202
+            $lines[$key] = trim($heading, " \t").':'.trim($value, " \t");
4204 4203
         }
4205 4204
 
4206 4205
         return implode("\r\n", $lines);
@@ -4226,7 +4225,7 @@  discard block
 block discarded – undo
4226 4225
         $body = static::normalizeBreaks($body, "\r\n");
4227 4226
 
4228 4227
         //Reduce multiple trailing line breaks to a single one
4229
-        return rtrim($body, "\r\n") . "\r\n";
4228
+        return rtrim($body, "\r\n")."\r\n";
4230 4229
     }
4231 4230
 
4232 4231
     /**
@@ -4282,33 +4281,33 @@  discard block
 block discarded – undo
4282 4281
         if ('' == $this->DKIM_identity) {
4283 4282
             $ident = '';
4284 4283
         } else {
4285
-            $ident = ' i=' . $this->DKIM_identity . ';';
4286
-        }
4287
-        $dkimhdrs = 'DKIM-Signature: v=1; a=' .
4288
-            $DKIMsignatureType . '; q=' .
4289
-            $DKIMquery . '; l=' .
4290
-            $DKIMlen . '; s=' .
4291
-            $this->DKIM_selector .
4292
-            ";\r\n" .
4293
-            "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" .
4294
-            "\th=From:To:Date:Subject;\r\n" .
4295
-            "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" .
4296
-            "\tz=$from\r\n" .
4297
-            "\t|$to\r\n" .
4298
-            "\t|$date\r\n" .
4299
-            "\t|$subject;\r\n" .
4300
-            "\tbh=" . $DKIMb64 . ";\r\n" .
4284
+            $ident = ' i='.$this->DKIM_identity.';';
4285
+        }
4286
+        $dkimhdrs = 'DKIM-Signature: v=1; a='.
4287
+            $DKIMsignatureType.'; q='.
4288
+            $DKIMquery.'; l='.
4289
+            $DKIMlen.'; s='.
4290
+            $this->DKIM_selector.
4291
+            ";\r\n".
4292
+            "\tt=".$DKIMtime.'; c='.$DKIMcanonicalization.";\r\n".
4293
+            "\th=From:To:Date:Subject;\r\n".
4294
+            "\td=".$this->DKIM_domain.';'.$ident."\r\n".
4295
+            "\tz=$from\r\n".
4296
+            "\t|$to\r\n".
4297
+            "\t|$date\r\n".
4298
+            "\t|$subject;\r\n".
4299
+            "\tbh=".$DKIMb64.";\r\n".
4301 4300
             "\tb=";
4302 4301
         $toSign = $this->DKIM_HeaderC(
4303
-            $from_header . "\r\n" .
4304
-            $to_header . "\r\n" .
4305
-            $date_header . "\r\n" .
4306
-            $subject_header . "\r\n" .
4302
+            $from_header."\r\n".
4303
+            $to_header."\r\n".
4304
+            $date_header."\r\n".
4305
+            $subject_header."\r\n".
4307 4306
             $dkimhdrs
4308 4307
         );
4309 4308
         $signed = $this->DKIM_Sign($toSign);
4310 4309
 
4311
-        return static::normalizeBreaks($dkimhdrs . $signed) . static::$LE;
4310
+        return static::normalizeBreaks($dkimhdrs.$signed).static::$LE;
4312 4311
     }
4313 4312
 
4314 4313
     /**
@@ -4321,7 +4320,7 @@  discard block
 block discarded – undo
4321 4320
      */
4322 4321
     public static function hasLineLongerThanMax($str)
4323 4322
     {
4324
-        return (bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + strlen(static::$LE)) . ',})/m', $str);
4323
+        return (bool) preg_match('/^(.{'.(self::MAX_LINE_LENGTH + strlen(static::$LE)).',})/m', $str);
4325 4324
     }
4326 4325
 
4327 4326
     /**
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_getimage.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 $pattern = '/<img[\s\n]+.*src=[\s\n]*"([^"]+\.(jpg|jpeg|png|gif))"[^>]+>/i';
3
-preg_match_all($pattern , $value , $images);
4
-if($opt==='')
3
+preg_match_all($pattern, $value, $images);
4
+if ($opt === '')
5 5
 {
6
-    if($images[1][0])  return $images[1][0];
6
+    if ($images[1][0])  return $images[1][0];
7 7
     else               return '';
8 8
 }
9 9
 else
10 10
 {
11
-    foreach($images[0] as $i=>$image)
11
+    foreach ($images[0] as $i=>$image)
12 12
     {
13
-        if(strpos($image,$opt)!==false) return $images[1][$i];
13
+        if (strpos($image, $opt) !== false) return $images[1][$i];
14 14
     }
15 15
 }
16 16
 
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_wordwrap.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1 1
 <?php
2
-return preg_replace_callback("~(\b\w+\b)~",function($m) use($wrapat) {return wordwrap($m[1],$wrapat,' ',1);},$value);
2
+return preg_replace_callback("~(\b\w+\b)~", function($m) use($wrapat) {return wordwrap($m[1], $wrapat, ' ', 1); },$value);
Please login to merge, or discard this patch.