Completed
Push — development ( 4f9711...19b263 )
by Nils
07:45
created
libraries/Authentication/TwoFactorAuth/Providers/Qr/QRServerProvider.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -51,6 +51,9 @@
 block discarded – undo
51 51
         return $this->getContent($this->getUrl($qrtext, $size));
52 52
     }
53 53
     
54
+    /**
55
+     * @param string $value
56
+     */
54 57
     private function decodeColor($value) 
55 58
     {
56 59
         return vsprintf('%d-%d-%d', sscanf($value, "%02x%02x%02x"));
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -59,13 +59,13 @@
 block discarded – undo
59 59
     public function getUrl($qrtext, $size) 
60 60
     {
61 61
         return 'https://api.qrserver.com/v1/create-qr-code/'
62
-            . '?size=' . $size . 'x' . $size
63
-            . '&ecc=' . strtoupper($this->errorcorrectionlevel)
64
-            . '&margin=' . $this->margin
65
-            . '&qzone=' . $this->qzone
66
-            . '&bgcolor=' . $this->decodeColor($this->bgcolor)
67
-            . '&color=' . $this->decodeColor($this->color)
68
-            . '&format=' . strtolower($this->format)
69
-            . '&data=' . rawurlencode($qrtext);
62
+            . '?size='.$size.'x'.$size
63
+            . '&ecc='.strtoupper($this->errorcorrectionlevel)
64
+            . '&margin='.$this->margin
65
+            . '&qzone='.$this->qzone
66
+            . '&bgcolor='.$this->decodeColor($this->bgcolor)
67
+            . '&color='.$this->decodeColor($this->color)
68
+            . '&format='.strtolower($this->format)
69
+            . '&data='.rawurlencode($qrtext);
70 70
     }
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 
15 15
     function __construct($verifyssl = false, $errorcorrectionlevel = 'L', $margin = 4, $qzone = 1, $bgcolor = 'ffffff', $color = '000000', $format = 'png') 
16 16
     {
17
-        if (!is_bool($verifyssl))
18
-            throw new QRException('VerifySSL must be bool');
17
+        if (!is_bool($verifyssl)) {
18
+                    throw new QRException('VerifySSL must be bool');
19
+        }
19 20
 
20 21
         $this->verifyssl = $verifyssl;
21 22
         
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@
 block discarded – undo
32 32
     {
33 33
         switch (strtolower($this->format))
34 34
         {
35
-        	case 'png':
35
+            case 'png':
36 36
                 return 'image/png';
37
-        	case 'gif':
37
+            case 'gif':
38 38
                 return 'image/gif';
39
-        	case 'jpg':
40
-        	case 'jpeg':
39
+            case 'jpg':
40
+            case 'jpeg':
41 41
                 return 'image/jpeg';
42
-        	case 'svg':
42
+            case 'svg':
43 43
                 return 'image/svg+xml';
44
-        	case 'eps':
44
+            case 'eps':
45 45
                 return 'application/postscript';
46 46
         }
47 47
         throw new \QRException(sprintf('Unknown MIME-type: %s', $this->format));
Please login to merge, or discard this patch.
includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -139,6 +139,7 @@
 block discarded – undo
139 139
 
140 140
     /**
141 141
      * Get data-uri of QRCode
142
+     * @param string $label
142 143
      */
143 144
     public function getQRCodeImageAsDataUri($label, $secret, $size = 200)
144 145
     {
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $algorithm = strtolower(trim($algorithm));
38 38
         if (!in_array($algorithm, self::$_supportedalgos))
39
-            throw new TwoFactorAuthException('Unsupported algorithm: ' . $algorithm);
39
+            throw new TwoFactorAuthException('Unsupported algorithm: '.$algorithm);
40 40
         $this->algorithm = $algorithm;
41 41
         $this->qrcodeprovider = $qrcodeprovider;
42 42
         $this->rngprovider = $rngprovider;
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
     public function createSecret($bits = 80, $requirecryptosecure = true)
53 53
     {
54 54
         $secret = '';
55
-        $bytes = ceil($bits / 5);   //We use 5 bits of each byte (since we have a 32-character 'alphabet' / BASE32)
55
+        $bytes = ceil($bits / 5); //We use 5 bits of each byte (since we have a 32-character 'alphabet' / BASE32)
56 56
         $rngprovider = $this->getRngprovider();
57 57
         if ($requirecryptosecure && !$rngprovider->isCryptographicallySecure())
58 58
             throw new TwoFactorAuthException('RNG provider is not cryptographically secure');
59 59
         $rnd = $rngprovider->getRandomBytes($bytes);
60 60
         for ($i = 0; $i < $bytes; $i++)
61
-            $secret .= self::$_base32[ord($rnd[$i]) & 31];  //Mask out left 3 bits for 0-31 values
61
+            $secret .= self::$_base32[ord($rnd[$i]) & 31]; //Mask out left 3 bits for 0-31 values
62 62
         return $secret;
63 63
     }
64 64
 
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $secretkey = $this->base32Decode($secret);
71 71
 
72
-        $timestamp = "\0\0\0\0" . pack('N*', $this->getTimeSlice($this->getTime($time)));  // Pack time into binary string
73
-        $hashhmac = hash_hmac($this->algorithm, $timestamp, $secretkey, true);             // Hash it with users secret key
74
-        $hashpart = substr($hashhmac, ord(substr($hashhmac, -1)) & 0x0F, 4);               // Use last nibble of result as index/offset and grab 4 bytes of the result
75
-        $value = unpack('N', $hashpart);                                                   // Unpack binary value
76
-        $value = $value[1] & 0x7FFFFFFF;                                                   // Drop MSB, keep only 31 bits
72
+        $timestamp = "\0\0\0\0".pack('N*', $this->getTimeSlice($this->getTime($time))); // Pack time into binary string
73
+        $hashhmac = hash_hmac($this->algorithm, $timestamp, $secretkey, true); // Hash it with users secret key
74
+        $hashpart = substr($hashhmac, ord(substr($hashhmac, -1)) & 0x0F, 4); // Use last nibble of result as index/offset and grab 4 bytes of the result
75
+        $value = unpack('N', $hashpart); // Unpack binary value
76
+        $value = $value[1] & 0x7FFFFFFF; // Drop MSB, keep only 31 bits
77 77
 
78 78
         return str_pad($value % pow(10, $this->digits), $this->digits, '0', STR_PAD_LEFT);
79 79
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         for ($i = -$discrepancy; $i <= $discrepancy; $i++)
91 91
             $result |= $this->codeEquals($this->getCode($secret, $timetamp + ($i * $this->period)), $code);
92 92
 
93
-        return (bool)$result;
93
+        return (bool) $result;
94 94
     }
95 95
 
96 96
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         }
103 103
         // In general, it's not possible to prevent length leaks. So it's OK to leak the length. The important part is that
104 104
         // we don't leak information about the difference of the two strings.
105
-        if (strlen($safe)===strlen($user)) {
105
+        if (strlen($safe) === strlen($user)) {
106 106
             $result = 0;
107 107
             for ($i = 0; $i < strlen($safe); $i++)
108 108
                 $result |= (ord($safe[$i]) ^ ord($user[$i]));
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
     private function getTimeSlice($time = null, $offset = 0)
163 163
     {
164
-        return (int)floor($time / $this->period) + ($offset * $this->period);
164
+        return (int) floor($time / $this->period) + ($offset * $this->period);
165 165
     }
166 166
 
167 167
     /**
@@ -169,17 +169,17 @@  discard block
 block discarded – undo
169 169
      */
170 170
     public function getQRText($label, $secret)
171 171
     {
172
-        return 'otpauth://totp/' . rawurlencode($label)
173
-            . '?secret=' . rawurlencode($secret)
174
-            . '&issuer=' . rawurlencode($this->issuer)
175
-            . '&period=' . intval($this->period)
176
-            . '&algorithm=' . rawurlencode(strtoupper($this->algorithm))
177
-            . '&digits=' . intval($this->digits);
172
+        return 'otpauth://totp/'.rawurlencode($label)
173
+            . '?secret='.rawurlencode($secret)
174
+            . '&issuer='.rawurlencode($this->issuer)
175
+            . '&period='.intval($this->period)
176
+            . '&algorithm='.rawurlencode(strtoupper($this->algorithm))
177
+            . '&digits='.intval($this->digits);
178 178
     }
179 179
 
180 180
     private function base32Decode($value)
181 181
     {
182
-        if (strlen($value)==0) return '';
182
+        if (strlen($value) == 0) return '';
183 183
 
184 184
         if (preg_match('/[^'.preg_quote(self::$_base32dict).']/', $value) !== 0)
185 185
             throw new TwoFactorAuthException('Invalid base32 string');
Please login to merge, or discard this patch.
Braces   +49 added lines, -31 removed lines patch added patch discarded remove patch
@@ -26,17 +26,20 @@  discard block
 block discarded – undo
26 26
     function __construct($issuer = null, $digits = 6, $period = 30, $algorithm = 'sha1', IQRCodeProvider $qrcodeprovider = null, IRNGProvider $rngprovider = null, ITimeProvider $timeprovider = null)
27 27
     {
28 28
         $this->issuer = $issuer;
29
-        if (!is_int($digits) || $digits <= 0)
30
-            throw new TwoFactorAuthException('Digits must be int > 0');
29
+        if (!is_int($digits) || $digits <= 0) {
30
+                    throw new TwoFactorAuthException('Digits must be int > 0');
31
+        }
31 32
         $this->digits = $digits;
32 33
 
33
-        if (!is_int($period) || $period <= 0)
34
-            throw new TwoFactorAuthException('Period must be int > 0');
34
+        if (!is_int($period) || $period <= 0) {
35
+                    throw new TwoFactorAuthException('Period must be int > 0');
36
+        }
35 37
         $this->period = $period;
36 38
 
37 39
         $algorithm = strtolower(trim($algorithm));
38
-        if (!in_array($algorithm, self::$_supportedalgos))
39
-            throw new TwoFactorAuthException('Unsupported algorithm: ' . $algorithm);
40
+        if (!in_array($algorithm, self::$_supportedalgos)) {
41
+                    throw new TwoFactorAuthException('Unsupported algorithm: ' . $algorithm);
42
+        }
40 43
         $this->algorithm = $algorithm;
41 44
         $this->qrcodeprovider = $qrcodeprovider;
42 45
         $this->rngprovider = $rngprovider;
@@ -54,11 +57,14 @@  discard block
 block discarded – undo
54 57
         $secret = '';
55 58
         $bytes = ceil($bits / 5);   //We use 5 bits of each byte (since we have a 32-character 'alphabet' / BASE32)
56 59
         $rngprovider = $this->getRngprovider();
57
-        if ($requirecryptosecure && !$rngprovider->isCryptographicallySecure())
58
-            throw new TwoFactorAuthException('RNG provider is not cryptographically secure');
60
+        if ($requirecryptosecure && !$rngprovider->isCryptographicallySecure()) {
61
+                    throw new TwoFactorAuthException('RNG provider is not cryptographically secure');
62
+        }
59 63
         $rnd = $rngprovider->getRandomBytes($bytes);
60
-        for ($i = 0; $i < $bytes; $i++)
61
-            $secret .= self::$_base32[ord($rnd[$i]) & 31];  //Mask out left 3 bits for 0-31 values
64
+        for ($i = 0; $i < $bytes; $i++) {
65
+                    $secret .= self::$_base32[ord($rnd[$i]) & 31];
66
+        }
67
+        //Mask out left 3 bits for 0-31 values
62 68
         return $secret;
63 69
     }
64 70
 
@@ -87,8 +93,9 @@  discard block
 block discarded – undo
87 93
         $timetamp = $this->getTime($time);
88 94
 
89 95
         // To keep safe from timing-attachs we iterate *all* possible codes even though we already may have verified a code is correct
90
-        for ($i = -$discrepancy; $i <= $discrepancy; $i++)
91
-            $result |= $this->codeEquals($this->getCode($secret, $timetamp + ($i * $this->period)), $code);
96
+        for ($i = -$discrepancy; $i <= $discrepancy; $i++) {
97
+                    $result |= $this->codeEquals($this->getCode($secret, $timetamp + ($i * $this->period)), $code);
98
+        }
92 99
 
93 100
         return (bool)$result;
94 101
     }
@@ -104,8 +111,9 @@  discard block
 block discarded – undo
104 111
         // we don't leak information about the difference of the two strings.
105 112
         if (strlen($safe)===strlen($user)) {
106 113
             $result = 0;
107
-            for ($i = 0; $i < strlen($safe); $i++)
108
-                $result |= (ord($safe[$i]) ^ ord($user[$i]));
114
+            for ($i = 0; $i < strlen($safe); $i++) {
115
+                            $result |= (ord($safe[$i]) ^ ord($user[$i]));
116
+            }
109 117
             return $result === 0;
110 118
         }
111 119
         return false;
@@ -116,8 +124,9 @@  discard block
 block discarded – undo
116 124
      */
117 125
     public function getQRCodeImageAsDataUri($label, $secret, $size = 200)
118 126
     {
119
-        if (!is_int($size) || $size <= 0)
120
-            throw new TwoFactorAuthException('Size must be int > 0');
127
+        if (!is_int($size) || $size <= 0) {
128
+                    throw new TwoFactorAuthException('Size must be int > 0');
129
+        }
121 130
 
122 131
         $qrcodeprovider = $this->getQrCodeProvider();
123 132
         return 'data:'
@@ -131,26 +140,30 @@  discard block
 block discarded – undo
131 140
      */
132 141
     public function ensureCorrectTime(array $timeproviders = null, $leniency = 5)
133 142
     {
134
-        if ($timeproviders != null && !is_array($timeproviders))
135
-            throw new TwoFactorAuthException('No timeproviders specified');
143
+        if ($timeproviders != null && !is_array($timeproviders)) {
144
+                    throw new TwoFactorAuthException('No timeproviders specified');
145
+        }
136 146
 
137
-        if ($timeproviders == null)
138
-            $timeproviders = array(
147
+        if ($timeproviders == null) {
148
+                    $timeproviders = array(
139 149
                 new Providers\Time\ConvertUnixTimeDotComTimeProvider(),
140 150
                 new Providers\Time\HttpTimeProvider()
141 151
             );
152
+        }
142 153
 
143 154
         // Get default time provider
144 155
         $timeprovider = $this->getTimeProvider();
145 156
 
146 157
         // Iterate specified time providers
147 158
         foreach ($timeproviders as $t) {
148
-            if (!($t instanceof ITimeProvider))
149
-                throw new TwoFactorAuthException('Object does not implement ITimeProvider');
159
+            if (!($t instanceof ITimeProvider)) {
160
+                            throw new TwoFactorAuthException('Object does not implement ITimeProvider');
161
+            }
150 162
 
151 163
             // Get time from default time provider and compare to specific time provider and throw if time difference is more than specified number of seconds leniency
152
-            if (abs($timeprovider->getTime() - $t->getTime()) > $leniency)
153
-                throw new TwoFactorAuthException(sprintf('Time for timeprovider is off by more than %d seconds when compared to %s', $leniency, get_class($t)));
164
+            if (abs($timeprovider->getTime() - $t->getTime()) > $leniency) {
165
+                            throw new TwoFactorAuthException(sprintf('Time for timeprovider is off by more than %d seconds when compared to %s', $leniency, get_class($t)));
166
+            }
154 167
         }
155 168
     }
156 169
 
@@ -179,23 +192,28 @@  discard block
 block discarded – undo
179 192
 
180 193
     private function base32Decode($value)
181 194
     {
182
-        if (strlen($value)==0) return '';
195
+        if (strlen($value)==0) {
196
+            return '';
197
+        }
183 198
 
184
-        if (preg_match('/[^'.preg_quote(self::$_base32dict).']/', $value) !== 0)
185
-            throw new TwoFactorAuthException('Invalid base32 string');
199
+        if (preg_match('/[^'.preg_quote(self::$_base32dict).']/', $value) !== 0) {
200
+                    throw new TwoFactorAuthException('Invalid base32 string');
201
+        }
186 202
 
187 203
         $buffer = '';
188 204
         foreach (str_split($value) as $char)
189 205
         {
190
-            if ($char !== '=')
191
-                $buffer .= str_pad(decbin(self::$_base32lookup[$char]), 5, 0, STR_PAD_LEFT);
206
+            if ($char !== '=') {
207
+                            $buffer .= str_pad(decbin(self::$_base32lookup[$char]), 5, 0, STR_PAD_LEFT);
208
+            }
192 209
         }
193 210
         $length = strlen($buffer);
194 211
         $blocks = trim(chunk_split(substr($buffer, 0, $length - ($length % 8)), 8, ' '));
195 212
 
196 213
         $output = '';
197
-        foreach (explode(' ', $blocks) as $block)
198
-            $output .= chr(bindec(str_pad($block, 8, 0, STR_PAD_RIGHT)));
214
+        foreach (explode(' ', $blocks) as $block) {
215
+                    $output .= chr(bindec(str_pad($block, 8, 0, STR_PAD_RIGHT)));
216
+        }
199 217
         return $output;
200 218
     }
201 219
 
Please login to merge, or discard this patch.
includes/libraries/Email/Phpmailer/class.pop3.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
      * Connect to a POP3 server.
201 201
      * @access public
202 202
      * @param string $host
203
-     * @param integer|boolean $port
203
+     * @param integer $port
204 204
      * @param integer $tval
205 205
      * @return boolean
206 206
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
         if (false === $port) {
170 170
             $this->port = $this->POP3_PORT;
171 171
         } else {
172
-            $this->port = (integer)$port;
172
+            $this->port = (integer) $port;
173 173
         }
174 174
         // If no timeout value provided, use default
175 175
         if (false === $timeout) {
176 176
             $this->tval = $this->POP3_TIMEOUT;
177 177
         } else {
178
-            $this->tval = (integer)$timeout;
178
+            $this->tval = (integer) $timeout;
179 179
         }
180 180
         $this->do_debug = $debug_level;
181 181
         $this->username = $username;
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
         }
277 277
 
278 278
         // Send the Username
279
-        $this->sendString("USER $username" . self::CRLF);
279
+        $this->sendString("USER $username".self::CRLF);
280 280
         $pop3_response = $this->getResponse();
281 281
         if ($this->checkResponse($pop3_response)) {
282 282
             // Send the Password
283
-            $this->sendString("PASS $password" . self::CRLF);
283
+            $this->sendString("PASS $password".self::CRLF);
284 284
             $pop3_response = $this->getResponse();
285 285
             if ($this->checkResponse($pop3_response)) {
286 286
                 return true;
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Qr/QRicketProvider.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
     public function getUrl($qrtext, $size) 
45 45
     {
46 46
         return 'http://qrickit.com/api/qr'
47
-            . '?qrsize=' . $size
48
-            . '&e=' . strtolower($this->errorcorrectionlevel)
49
-            . '&bgdcolor=' . $this->bgcolor
50
-            . '&fgdcolor=' . $this->color
51
-            . '&t=' . strtolower($this->format)
52
-            . '&d=' . rawurlencode($qrtext);
47
+            . '?qrsize='.$size
48
+            . '&e='.strtolower($this->errorcorrectionlevel)
49
+            . '&bgdcolor='.$this->bgcolor
50
+            . '&fgdcolor='.$this->color
51
+            . '&t='.strtolower($this->format)
52
+            . '&d='.rawurlencode($qrtext);
53 53
     }
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
     {
28 28
         switch (strtolower($this->format))
29 29
         {
30
-        	case 'p':
30
+            case 'p':
31 31
                 return 'image/png';
32
-        	case 'g':
32
+            case 'g':
33 33
                 return 'image/gif';
34
-        	case 'j':
34
+            case 'j':
35 35
                 return 'image/jpeg';
36 36
         }
37 37
         throw new \QRException(sprintf('Unknown MIME-type: %s', $this->format));
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Rng/CSRNGProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 class CSRNGProvider implements IRNGProvider
7 7
 {
8 8
     public function getRandomBytes($bytecount) {
9
-        return random_bytes($bytecount);    // PHP7+
9
+        return random_bytes($bytecount); // PHP7+
10 10
     }
11 11
 
12 12
     public function isCryptographicallySecure() {
Please login to merge, or discard this patch.
includes/libraries/Email/Phpmailer/language/phpmailer.lang-ar.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 $PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
20 20
 $PHPMAILER_LANG['provide_address']      = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
21 21
 $PHPMAILER_LANG['recipients_failed']    = 'خطأ SMTP: الأخطاء التالية ' .
22
-                                          'فشل في الارسال لكل من : ';
22
+                                            'فشل في الارسال لكل من : ';
23 23
 $PHPMAILER_LANG['signing']              = 'خطأ في التوقيع: ';
24 24
 $PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() غير ممكن.';
25 25
 $PHPMAILER_LANG['smtp_error']           = 'خطأ على مستوى الخادم SMTP: ';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 $PHPMAILER_LANG['invalid_address']      = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
19 19
 $PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
20 20
 $PHPMAILER_LANG['provide_address']      = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
21
-$PHPMAILER_LANG['recipients_failed']    = 'خطأ SMTP: الأخطاء التالية ' .
21
+$PHPMAILER_LANG['recipients_failed']    = 'خطأ SMTP: الأخطاء التالية '.
22 22
                                           'فشل في الارسال لكل من : ';
23 23
 $PHPMAILER_LANG['signing']              = 'خطأ في التوقيع: ';
24 24
 $PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() غير ممكن.';
Please login to merge, or discard this patch.
install/upgrade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         } elseif (substr_count($val, '$pre = ') > 0) {
57 57
             $_SESSION['pre'] = getSettingValue($val);
58 58
         } elseif (substr_count($val, "define('SECUREPATH',") > 0) {
59
-            $_SESSION['sk_file'] = substr($val, 23, strpos($val, ');')-24)."/sk.php";
59
+            $_SESSION['sk_file'] = substr($val, 23, strpos($val, ');') - 24)."/sk.php";
60 60
         }
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
includes/libraries/Email/Phpmailer/class.smtp.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -227,21 +227,21 @@  discard block
 block discarded – undo
227 227
                 break;
228 228
             case 'html':
229 229
                 //Cleans up output a bit for a better looking, HTML-safe output
230
-                echo gmdate('Y-m-d H:i:s') . ' ' . htmlentities(
230
+                echo gmdate('Y-m-d H:i:s').' '.htmlentities(
231 231
                     preg_replace('/[\r\n]+/', '', $str),
232 232
                     ENT_QUOTES,
233 233
                     'UTF-8'
234
-                ) . "<br>\n";
234
+                )."<br>\n";
235 235
                 break;
236 236
             case 'echo':
237 237
             default:
238 238
                 //Normalize line breaks
239 239
                 $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str);
240
-                echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
240
+                echo gmdate('Y-m-d H:i:s')."\t".str_replace(
241 241
                     "\n",
242 242
                     "\n                   \t                  ",
243 243
                     trim($str)
244
-                ) . "\n";
244
+                )."\n";
245 245
         }
246 246
     }
247 247
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         }
276 276
         // Connect to the SMTP server
277 277
         $this->edebug(
278
-            "Connection: opening to $host:$port, timeout=$timeout, options=" .
278
+            "Connection: opening to $host:$port, timeout=$timeout, options=".
279 279
             var_export($options, true),
280 280
             self::DEBUG_CONNECTION
281 281
         );
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             $socket_context = stream_context_create($options);
286 286
             set_error_handler(array($this, 'errorHandler'));
287 287
             $this->smtp_conn = stream_socket_client(
288
-                $host . ":" . $port,
288
+                $host.":".$port,
289 289
                 $errno,
290 290
                 $errstr,
291 291
                 $timeout,
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                 $errstr
318 318
             );
319 319
             $this->edebug(
320
-                'SMTP ERROR: ' . $this->error['error']
320
+                'SMTP ERROR: '.$this->error['error']
321 321
                 . ": $errstr ($errno)",
322 322
                 self::DEBUG_CLIENT
323 323
             );
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         }
337 337
         // Get any announcement
338 338
         $announce = $this->get_lines();
339
-        $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);
339
+        $this->edebug('SERVER -> CLIENT: '.$announce, self::DEBUG_SERVER);
340 340
         return true;
341 341
     }
342 342
 
@@ -406,9 +406,9 @@  discard block
 block discarded – undo
406 406
                 return false;
407 407
             }
408 408
 
409
-            self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);
409
+            self::edebug('Auth method requested: '.($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);
410 410
             self::edebug(
411
-                'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']),
411
+                'Auth methods available on the server: '.implode(',', $this->server_caps['AUTH']),
412 412
                 self::DEBUG_LOWLEVEL
413 413
             );
414 414
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                     $this->setError('No supported authentication methods found');
424 424
                     return false;
425 425
                 }
426
-                self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL);
426
+                self::edebug('Auth method selected: '.$authtype, self::DEBUG_LOWLEVEL);
427 427
             }
428 428
 
429 429
             if (!in_array($authtype, $this->server_caps['AUTH'])) {
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
                 // Send encoded username and password
443 443
                 if (!$this->sendCommand(
444 444
                     'User & Password',
445
-                    base64_encode("\0" . $username . "\0" . $password),
445
+                    base64_encode("\0".$username."\0".$password),
446 446
                     235
447 447
                 )
448 448
                 ) {
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
                 $oauth = $OAuth->getOauth64();
471 471
 
472 472
                 // Start authentication
473
-                if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
473
+                if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 '.$oauth, 235)) {
474 474
                     return false;
475 475
                 }
476 476
                 break;
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 
502 502
                 if (!$this->sendCommand(
503 503
                     'AUTH NTLM',
504
-                    'AUTH NTLM ' . base64_encode($msg1),
504
+                    'AUTH NTLM '.base64_encode($msg1),
505 505
                     334
506 506
                 )
507 507
                 ) {
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
                 $challenge = base64_decode(substr($this->last_reply, 4));
534 534
 
535 535
                 // Build the response
536
-                $response = $username . ' ' . $this->hmac($challenge, $password);
536
+                $response = $username.' '.$this->hmac($challenge, $password);
537 537
 
538 538
                 // send encoded credentials
539 539
                 return $this->sendCommand('Username', base64_encode($response), 235);
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
         $k_ipad = $key ^ $ipad;
578 578
         $k_opad = $key ^ $opad;
579 579
 
580
-        return md5($k_opad . pack('H*', md5($k_ipad . $data)));
580
+        return md5($k_opad.pack('H*', md5($k_ipad.$data)));
581 581
     }
582 582
 
583 583
     /**
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
                 }
690 690
                 //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1
691 691
                 if ($in_headers) {
692
-                    $line = "\t" . $line;
692
+                    $line = "\t".$line;
693 693
                 }
694 694
             }
695 695
             $lines_out[] = $line;
@@ -698,9 +698,9 @@  discard block
 block discarded – undo
698 698
             foreach ($lines_out as $line_out) {
699 699
                 //RFC2821 section 4.5.2
700 700
                 if (!empty($line_out) and $line_out[0] == '.') {
701
-                    $line_out = '.' . $line_out;
701
+                    $line_out = '.'.$line_out;
702 702
                 }
703
-                $this->client_send($line_out . self::CRLF);
703
+                $this->client_send($line_out.self::CRLF);
704 704
             }
705 705
         }
706 706
 
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
     public function hello($host = '')
728 728
     {
729 729
         //Try extended hello first (RFC 2821)
730
-        return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host));
730
+        return (boolean) ($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host));
731 731
     }
732 732
 
733 733
     /**
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
      */
742 742
     protected function sendHello($hello, $host)
743 743
     {
744
-        $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250);
744
+        $noerror = $this->sendCommand($hello, $hello.' '.$host, 250);
745 745
         $this->helo_rply = $this->last_reply;
746 746
         if ($noerror) {
747 747
             $this->parseHelloFields($hello);
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
         $useVerp = ($this->do_verp ? ' XVERP' : '');
810 810
         return $this->sendCommand(
811 811
             'MAIL FROM',
812
-            'MAIL FROM:<' . $from . '>' . $useVerp,
812
+            'MAIL FROM:<'.$from.'>'.$useVerp,
813 813
             250
814 814
         );
815 815
     }
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
     {
847 847
         return $this->sendCommand(
848 848
             'RCPT TO',
849
-            'RCPT TO:<' . $address . '>',
849
+            'RCPT TO:<'.$address.'>',
850 850
             array(250, 251)
851 851
         );
852 852
     }
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
             $this->setError("Command '$command' contained line breaks");
883 883
             return false;
884 884
         }
885
-        $this->client_send($commandstring . self::CRLF);
885
+        $this->client_send($commandstring.self::CRLF);
886 886
 
887 887
         $this->last_reply = $this->get_lines();
888 888
         // Fetch SMTP code and possible error code explanation
@@ -892,8 +892,8 @@  discard block
 block discarded – undo
892 892
             $code_ex = (count($matches) > 2 ? $matches[2] : null);
893 893
             // Cut off error code from each response line
894 894
             $detail = preg_replace(
895
-                "/{$code}[ -]" .
896
-                ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . "/m",
895
+                "/{$code}[ -]".
896
+                ($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '')."/m",
897 897
                 '',
898 898
                 $this->last_reply
899 899
             );
@@ -904,9 +904,9 @@  discard block
 block discarded – undo
904 904
             $detail = substr($this->last_reply, 4);
905 905
         }
906 906
 
907
-        $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
907
+        $this->edebug('SERVER -> CLIENT: '.$this->last_reply, self::DEBUG_SERVER);
908 908
 
909
-        if (!in_array($code, (array)$expect)) {
909
+        if (!in_array($code, (array) $expect)) {
910 910
             $this->setError(
911 911
                 "$command command failed",
912 912
                 $detail,
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
                 $code_ex
915 915
             );
916 916
             $this->edebug(
917
-                'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply,
917
+                'SMTP ERROR: '.$this->error['error'].': '.$this->last_reply,
918 918
                 self::DEBUG_CLIENT
919 919
             );
920 920
             return false;
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
     public function turn()
977 977
     {
978 978
         $this->setError('The SMTP TURN command is not implemented');
979
-        $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);
979
+        $this->edebug('SMTP NOTICE: '.$this->error['error'], self::DEBUG_CLIENT);
980 980
         return false;
981 981
     }
982 982
 
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
             $info = stream_get_meta_data($this->smtp_conn);
1103 1103
             if ($info['timed_out']) {
1104 1104
                 $this->edebug(
1105
-                    'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',
1105
+                    'SMTP -> get_lines(): timed-out ('.$this->Timeout.' sec)',
1106 1106
                     self::DEBUG_LOWLEVEL
1107 1107
                 );
1108 1108
                 break;
@@ -1110,8 +1110,8 @@  discard block
 block discarded – undo
1110 1110
             // Now check if reads took too long
1111 1111
             if ($endtime and time() > $endtime) {
1112 1112
                 $this->edebug(
1113
-                    'SMTP -> get_lines(): timelimit reached (' .
1114
-                    $this->Timelimit . ' sec)',
1113
+                    'SMTP -> get_lines(): timelimit reached ('.
1114
+                    $this->Timelimit.' sec)',
1115 1115
                     self::DEBUG_LOWLEVEL
1116 1116
                 );
1117 1117
                 break;
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
             $errmsg
1226 1226
         );
1227 1227
         $this->edebug(
1228
-            $notice . ' Error #' . $errno . ': ' . $errmsg . " [$errfile line $errline]",
1228
+            $notice.' Error #'.$errno.': '.$errmsg." [$errfile line $errline]",
1229 1229
             self::DEBUG_CONNECTION
1230 1230
         );
1231 1231
     }
Please login to merge, or discard this patch.
includes/libraries/Email/Phpmailer/class.phpmailer.php 1 patch
Spacing   +167 added lines, -168 removed lines patch added patch discarded remove patch
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
     public function __construct($exceptions = null)
658 658
     {
659 659
         if ($exceptions !== null) {
660
-            $this->exceptions = (boolean)$exceptions;
660
+            $this->exceptions = (boolean) $exceptions;
661 661
         }
662 662
     }
663 663
 
@@ -736,11 +736,11 @@  discard block
 block discarded – undo
736 736
             default:
737 737
                 //Normalize line breaks
738 738
                 $str = preg_replace('/\r\n?/ms', "\n", $str);
739
-                echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
739
+                echo gmdate('Y-m-d H:i:s')."\t".str_replace(
740 740
                     "\n",
741 741
                     "\n                   \t                  ",
742 742
                     trim($str)
743
-                ) . "\n";
743
+                )."\n";
744 744
         }
745 745
     }
746 746
 
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
         $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
873 873
         if (($pos = strrpos($address, '@')) === false) {
874 874
             // At-sign is misssing.
875
-            $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
875
+            $error_message = $this->lang('invalid_address')." (addAnAddress $kind): $address";
876 876
             $this->setError($error_message);
877 877
             $this->edebug($error_message);
878 878
             if ($this->exceptions) {
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
     protected function addAnAddress($kind, $address, $name = '')
914 914
     {
915 915
         if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) {
916
-            $error_message = $this->lang('Invalid recipient kind: ') . $kind;
916
+            $error_message = $this->lang('Invalid recipient kind: ').$kind;
917 917
             $this->setError($error_message);
918 918
             $this->edebug($error_message);
919 919
             if ($this->exceptions) {
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
             return false;
923 923
         }
924 924
         if (!$this->validateAddress($address)) {
925
-            $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
925
+            $error_message = $this->lang('invalid_address')." (addAnAddress $kind): $address";
926 926
             $this->setError($error_message);
927 927
             $this->edebug($error_message);
928 928
             if ($this->exceptions) {
@@ -963,10 +963,10 @@  discard block
 block discarded – undo
963 963
             $list = imap_rfc822_parse_adrlist($addrstr, '');
964 964
             foreach ($list as $address) {
965 965
                 if ($address->host != '.SYNTAX-ERROR.') {
966
-                    if ($this->validateAddress($address->mailbox . '@' . $address->host)) {
966
+                    if ($this->validateAddress($address->mailbox.'@'.$address->host)) {
967 967
                         $addresses[] = array(
968 968
                             'name' => (property_exists($address, 'personal') ? $address->personal : ''),
969
-                            'address' => $address->mailbox . '@' . $address->host
969
+                            'address' => $address->mailbox.'@'.$address->host
970 970
                         );
971 971
                     }
972 972
                 }
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
         if (($pos = strrpos($address, '@')) === false or
1017 1017
             (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
1018 1018
             !$this->validateAddress($address)) {
1019
-            $error_message = $this->lang('invalid_address') . " (setFrom) $address";
1019
+            $error_message = $this->lang('invalid_address')." (setFrom) $address";
1020 1020
             $this->setError($error_message);
1021 1021
             $this->edebug($error_message);
1022 1022
             if ($this->exceptions) {
@@ -1107,30 +1107,30 @@  discard block
 block discarded – undo
1107 1107
                  * @copyright 2009-2010 Michael Rushton
1108 1108
                  * Feel free to use and redistribute this code. But please keep this copyright notice.
1109 1109
                  */
1110
-                return (boolean)preg_match(
1111
-                    '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' .
1112
-                    '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' .
1113
-                    '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' .
1114
-                    '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' .
1115
-                    '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .
1116
-                    '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .
1117
-                    '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .
1118
-                    '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
1110
+                return (boolean) preg_match(
1111
+                    '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)'.
1112
+                    '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)'.
1113
+                    '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)'.
1114
+                    '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*'.
1115
+                    '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)'.
1116
+                    '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}'.
1117
+                    '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:'.
1118
+                    '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}'.
1119 1119
                     '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD',
1120 1120
                     $address
1121 1121
                 );
1122 1122
             case 'pcre':
1123 1123
                 //An older regex that doesn't need a recent PCRE
1124
-                return (boolean)preg_match(
1125
-                    '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' .
1126
-                    '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' .
1127
-                    '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' .
1128
-                    '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' .
1129
-                    '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' .
1130
-                    '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' .
1131
-                    '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' .
1132
-                    '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' .
1133
-                    '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
1124
+                return (boolean) preg_match(
1125
+                    '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>'.
1126
+                    '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")'.
1127
+                    '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*'.
1128
+                    '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})'.
1129
+                    '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:'.
1130
+                    '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?'.
1131
+                    '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:'.
1132
+                    '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?'.
1133
+                    '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}'.
1134 1134
                     '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD',
1135 1135
                     $address
1136 1136
                 );
@@ -1139,8 +1139,8 @@  discard block
 block discarded – undo
1139 1139
                  * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.
1140 1140
                  * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
1141 1141
                  */
1142
-                return (boolean)preg_match(
1143
-                    '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .
1142
+                return (boolean) preg_match(
1143
+                    '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}'.
1144 1144
                     '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',
1145 1145
                     $address
1146 1146
                 );
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
                     and strpos($address, '@') != strlen($address) - 1);
1153 1153
             case 'php':
1154 1154
             default:
1155
-                return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL);
1155
+                return (boolean) filter_var($address, FILTER_VALIDATE_EMAIL);
1156 1156
         }
1157 1157
     }
1158 1158
 
@@ -1189,9 +1189,8 @@  discard block
 block discarded – undo
1189 1189
             if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) {
1190 1190
                 $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet);
1191 1191
                 if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ?
1192
-                    idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) :
1193
-                    idn_to_ascii($domain)) !== false) {
1194
-                    return substr($address, 0, $pos) . $punycode;
1192
+                    idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($domain)) !== false) {
1193
+                    return substr($address, 0, $pos).$punycode;
1195 1194
                 }
1196 1195
             }
1197 1196
         }
@@ -1249,7 +1248,7 @@  discard block
 block discarded – undo
1249 1248
                 }
1250 1249
                 $this->$address_kind = $this->punyencodeAddress($this->$address_kind);
1251 1250
                 if (!$this->validateAddress($this->$address_kind)) {
1252
-                    $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind;
1251
+                    $error_message = $this->lang('invalid_address').' (punyEncode) '.$this->$address_kind;
1253 1252
                     $this->setError($error_message);
1254 1253
                     $this->edebug($error_message);
1255 1254
                     if ($this->exceptions) {
@@ -1300,12 +1299,12 @@  discard block
 block discarded – undo
1300 1299
                 )
1301 1300
             ) {
1302 1301
                 $header_dkim = $this->DKIM_Add(
1303
-                    $this->MIMEHeader . $this->mailHeader,
1302
+                    $this->MIMEHeader.$this->mailHeader,
1304 1303
                     $this->encodeHeader($this->secureHeader($this->Subject)),
1305 1304
                     $this->MIMEBody
1306 1305
                 );
1307
-                $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . self::CRLF .
1308
-                    str_replace("\r\n", "\n", $header_dkim) . self::CRLF;
1306
+                $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ").self::CRLF.
1307
+                    str_replace("\r\n", "\n", $header_dkim).self::CRLF;
1309 1308
             }
1310 1309
             return true;
1311 1310
         } catch (phpmailerException $exc) {
@@ -1385,9 +1384,9 @@  discard block
 block discarded – undo
1385 1384
         if ($this->SingleTo) {
1386 1385
             foreach ($this->SingleToArray as $toAddr) {
1387 1386
                 if (!@$mail = popen($sendmail, 'w')) {
1388
-                    throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1387
+                    throw new phpmailerException($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1389 1388
                 }
1390
-                fputs($mail, 'To: ' . $toAddr . "\n");
1389
+                fputs($mail, 'To: '.$toAddr."\n");
1391 1390
                 fputs($mail, $header);
1392 1391
                 fputs($mail, $body);
1393 1392
                 $result = pclose($mail);
@@ -1401,12 +1400,12 @@  discard block
 block discarded – undo
1401 1400
                     $this->From
1402 1401
                 );
1403 1402
                 if ($result != 0) {
1404
-                    throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1403
+                    throw new phpmailerException($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1405 1404
                 }
1406 1405
             }
1407 1406
         } else {
1408 1407
             if (!@$mail = popen($sendmail, 'w')) {
1409
-                throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1408
+                throw new phpmailerException($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1410 1409
             }
1411 1410
             fputs($mail, $header);
1412 1411
             fputs($mail, $body);
@@ -1421,7 +1420,7 @@  discard block
 block discarded – undo
1421 1420
                 $this->From
1422 1421
             );
1423 1422
             if ($result != 0) {
1424
-                throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1423
+                throw new phpmailerException($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL);
1425 1424
             }
1426 1425
         }
1427 1426
         return true;
@@ -1546,7 +1545,7 @@  discard block
 block discarded – undo
1546 1545
             $smtp_from = $this->From;
1547 1546
         }
1548 1547
         if (!$this->smtp->mail($smtp_from)) {
1549
-            $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
1548
+            $this->setError($this->lang('from_failed').$smtp_from.' : '.implode(',', $this->smtp->getError()));
1550 1549
             throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL);
1551 1550
         }
1552 1551
 
@@ -1565,7 +1564,7 @@  discard block
 block discarded – undo
1565 1564
         }
1566 1565
 
1567 1566
         // Only send the DATA command if we have viable recipients
1568
-        if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) {
1567
+        if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header.$body)) {
1569 1568
             throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);
1570 1569
         }
1571 1570
         if ($this->SMTPKeepAlive) {
@@ -1578,10 +1577,10 @@  discard block
 block discarded – undo
1578 1577
         if (count($bad_rcpt) > 0) {
1579 1578
             $errstr = '';
1580 1579
             foreach ($bad_rcpt as $bad) {
1581
-                $errstr .= $bad['to'] . ': ' . $bad['error'];
1580
+                $errstr .= $bad['to'].': '.$bad['error'];
1582 1581
             }
1583 1582
             throw new phpmailerException(
1584
-                $this->lang('recipients_failed') . $errstr,
1583
+                $this->lang('recipients_failed').$errstr,
1585 1584
                 self::STOP_CONTINUE
1586 1585
             );
1587 1586
         }
@@ -1653,11 +1652,11 @@  discard block
 block discarded – undo
1653 1652
             }
1654 1653
             $host = $hostinfo[3];
1655 1654
             $port = $this->Port;
1656
-            $tport = (integer)$hostinfo[4];
1655
+            $tport = (integer) $hostinfo[4];
1657 1656
             if ($tport > 0 and $tport < 65536) {
1658 1657
                 $port = $tport;
1659 1658
             }
1660
-            if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) {
1659
+            if ($this->smtp->connect($prefix.$host, $port, $this->Timeout, $options)) {
1661 1660
                 try {
1662 1661
                     if ($this->Helo) {
1663 1662
                         $hello = $this->Helo;
@@ -1772,14 +1771,14 @@  discard block
 block discarded – undo
1772 1771
         );
1773 1772
         if (empty($lang_path)) {
1774 1773
             // Calculate an absolute path so it can work if CWD is not here
1775
-            $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;
1774
+            $lang_path = dirname(__FILE__).DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR;
1776 1775
         }
1777 1776
         //Validate $langcode
1778 1777
         if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
1779 1778
             $langcode = 'en';
1780 1779
         }
1781 1780
         $foundlang = true;
1782
-        $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
1781
+        $lang_file = $lang_path.'phpmailer.lang-'.$langcode.'.php';
1783 1782
         // There is no English translation file
1784 1783
         if ($langcode != 'en') {
1785 1784
             // Make sure language file path is readable
@@ -1792,7 +1791,7 @@  discard block
 block discarded – undo
1792 1791
             }
1793 1792
         }
1794 1793
         $this->language = $PHPMAILER_LANG;
1795
-        return (boolean)$foundlang; // Returns false if language not found
1794
+        return (boolean) $foundlang; // Returns false if language not found
1796 1795
     }
1797 1796
 
1798 1797
     /**
@@ -1820,7 +1819,7 @@  discard block
 block discarded – undo
1820 1819
         foreach ($addr as $address) {
1821 1820
             $addresses[] = $this->addrFormat($address);
1822 1821
         }
1823
-        return $type . ': ' . implode(', ', $addresses) . $this->LE;
1822
+        return $type.': '.implode(', ', $addresses).$this->LE;
1824 1823
     }
1825 1824
 
1826 1825
     /**
@@ -1835,9 +1834,9 @@  discard block
 block discarded – undo
1835 1834
         if (empty($addr[1])) { // No name provided
1836 1835
             return $this->secureHeader($addr[0]);
1837 1836
         } else {
1838
-            return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader(
1837
+            return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase').' <'.$this->secureHeader(
1839 1838
                 $addr[0]
1840
-            ) . '>';
1839
+            ).'>';
1841 1840
         }
1842 1841
     }
1843 1842
 
@@ -1894,10 +1893,10 @@  discard block
 block discarded – undo
1894 1893
                             }
1895 1894
                             $part = substr($word, 0, $len);
1896 1895
                             $word = substr($word, $len);
1897
-                            $buf .= ' ' . $part;
1898
-                            $message .= $buf . sprintf('=%s', self::CRLF);
1896
+                            $buf .= ' '.$part;
1897
+                            $message .= $buf.sprintf('=%s', self::CRLF);
1899 1898
                         } else {
1900
-                            $message .= $buf . $soft_break;
1899
+                            $message .= $buf.$soft_break;
1901 1900
                         }
1902 1901
                         $buf = '';
1903 1902
                     }
@@ -1917,7 +1916,7 @@  discard block
 block discarded – undo
1917 1916
                         $word = substr($word, $len);
1918 1917
 
1919 1918
                         if (strlen($word) > 0) {
1920
-                            $message .= $part . sprintf('=%s', self::CRLF);
1919
+                            $message .= $part.sprintf('=%s', self::CRLF);
1921 1920
                         } else {
1922 1921
                             $buf = $part;
1923 1922
                         }
@@ -1930,13 +1929,13 @@  discard block
 block discarded – undo
1930 1929
                     $buf .= $word;
1931 1930
 
1932 1931
                     if (strlen($buf) > $length and $buf_o != '') {
1933
-                        $message .= $buf_o . $soft_break;
1932
+                        $message .= $buf_o.$soft_break;
1934 1933
                         $buf = $word;
1935 1934
                     }
1936 1935
                 }
1937 1936
                 $firstword = false;
1938 1937
             }
1939
-            $message .= $buf . self::CRLF;
1938
+            $message .= $buf.self::CRLF;
1940 1939
         }
1941 1940
 
1942 1941
         return $message;
@@ -2082,7 +2081,7 @@  discard block
 block discarded – undo
2082 2081
         if ($this->XMailer == '') {
2083 2082
             $result .= $this->headerLine(
2084 2083
                 'X-Mailer',
2085
-                'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)'
2084
+                'PHPMailer '.$this->Version.' (https://github.com/PHPMailer/PHPMailer)'
2086 2085
             );
2087 2086
         } else {
2088 2087
             $myXmailer = trim($this->XMailer);
@@ -2092,7 +2091,7 @@  discard block
 block discarded – undo
2092 2091
         }
2093 2092
 
2094 2093
         if ($this->ConfirmReadingTo != '') {
2095
-            $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>');
2094
+            $result .= $this->headerLine('Disposition-Notification-To', '<'.$this->ConfirmReadingTo.'>');
2096 2095
         }
2097 2096
 
2098 2097
         // Add custom headers
@@ -2122,23 +2121,23 @@  discard block
 block discarded – undo
2122 2121
         switch ($this->message_type) {
2123 2122
             case 'inline':
2124 2123
                 $result .= $this->headerLine('Content-Type', 'multipart/related;');
2125
-                $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"');
2124
+                $result .= $this->textLine("\tboundary=\"".$this->boundary[1].'"');
2126 2125
                 break;
2127 2126
             case 'attach':
2128 2127
             case 'inline_attach':
2129 2128
             case 'alt_attach':
2130 2129
             case 'alt_inline_attach':
2131 2130
                 $result .= $this->headerLine('Content-Type', 'multipart/mixed;');
2132
-                $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"');
2131
+                $result .= $this->textLine("\tboundary=\"".$this->boundary[1].'"');
2133 2132
                 break;
2134 2133
             case 'alt':
2135 2134
             case 'alt_inline':
2136 2135
                 $result .= $this->headerLine('Content-Type', 'multipart/alternative;');
2137
-                $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"');
2136
+                $result .= $this->textLine("\tboundary=\"".$this->boundary[1].'"');
2138 2137
                 break;
2139 2138
             default:
2140 2139
                 // Catches case 'plain': and case '':
2141
-                $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet);
2140
+                $result .= $this->textLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet);
2142 2141
                 $ismultipart = false;
2143 2142
                 break;
2144 2143
         }
@@ -2172,7 +2171,7 @@  discard block
 block discarded – undo
2172 2171
      */
2173 2172
     public function getSentMIMEMessage()
2174 2173
     {
2175
-        return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
2174
+        return rtrim($this->MIMEHeader.$this->mailHeader, "\n\r").self::CRLF.self::CRLF.$this->MIMEBody;
2176 2175
     }
2177 2176
 
2178 2177
     /**
@@ -2195,12 +2194,12 @@  discard block
 block discarded – undo
2195 2194
         $body = '';
2196 2195
         //Create unique IDs and preset boundaries
2197 2196
         $this->uniqueid = $this->generateId();
2198
-        $this->boundary[1] = 'b1_' . $this->uniqueid;
2199
-        $this->boundary[2] = 'b2_' . $this->uniqueid;
2200
-        $this->boundary[3] = 'b3_' . $this->uniqueid;
2197
+        $this->boundary[1] = 'b1_'.$this->uniqueid;
2198
+        $this->boundary[2] = 'b2_'.$this->uniqueid;
2199
+        $this->boundary[3] = 'b3_'.$this->uniqueid;
2201 2200
 
2202 2201
         if ($this->sign_key_file) {
2203
-            $body .= $this->getMailMIME() . $this->LE;
2202
+            $body .= $this->getMailMIME().$this->LE;
2204 2203
         }
2205 2204
 
2206 2205
         $this->setWordWrap();
@@ -2233,31 +2232,31 @@  discard block
 block discarded – undo
2233 2232
             $altBodyEncoding = 'quoted-printable';
2234 2233
         }
2235 2234
         //Use this as a preamble in all multipart message types
2236
-        $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE;
2235
+        $mimepre = "This is a multi-part message in MIME format.".$this->LE.$this->LE;
2237 2236
         switch ($this->message_type) {
2238 2237
             case 'inline':
2239 2238
                 $body .= $mimepre;
2240 2239
                 $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);
2241 2240
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
2242
-                $body .= $this->LE . $this->LE;
2241
+                $body .= $this->LE.$this->LE;
2243 2242
                 $body .= $this->attachAll('inline', $this->boundary[1]);
2244 2243
                 break;
2245 2244
             case 'attach':
2246 2245
                 $body .= $mimepre;
2247 2246
                 $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);
2248 2247
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
2249
-                $body .= $this->LE . $this->LE;
2248
+                $body .= $this->LE.$this->LE;
2250 2249
                 $body .= $this->attachAll('attachment', $this->boundary[1]);
2251 2250
                 break;
2252 2251
             case 'inline_attach':
2253 2252
                 $body .= $mimepre;
2254
-                $body .= $this->textLine('--' . $this->boundary[1]);
2253
+                $body .= $this->textLine('--'.$this->boundary[1]);
2255 2254
                 $body .= $this->headerLine('Content-Type', 'multipart/related;');
2256
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2255
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2257 2256
                 $body .= $this->LE;
2258 2257
                 $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding);
2259 2258
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
2260
-                $body .= $this->LE . $this->LE;
2259
+                $body .= $this->LE.$this->LE;
2261 2260
                 $body .= $this->attachAll('inline', $this->boundary[2]);
2262 2261
                 $body .= $this->LE;
2263 2262
                 $body .= $this->attachAll('attachment', $this->boundary[1]);
@@ -2266,14 +2265,14 @@  discard block
 block discarded – undo
2266 2265
                 $body .= $mimepre;
2267 2266
                 $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding);
2268 2267
                 $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
2269
-                $body .= $this->LE . $this->LE;
2268
+                $body .= $this->LE.$this->LE;
2270 2269
                 $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding);
2271 2270
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
2272
-                $body .= $this->LE . $this->LE;
2271
+                $body .= $this->LE.$this->LE;
2273 2272
                 if (!empty($this->Ical)) {
2274 2273
                     $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', '');
2275 2274
                     $body .= $this->encodeString($this->Ical, $this->Encoding);
2276
-                    $body .= $this->LE . $this->LE;
2275
+                    $body .= $this->LE.$this->LE;
2277 2276
                 }
2278 2277
                 $body .= $this->endBoundary($this->boundary[1]);
2279 2278
                 break;
@@ -2281,50 +2280,50 @@  discard block
 block discarded – undo
2281 2280
                 $body .= $mimepre;
2282 2281
                 $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding);
2283 2282
                 $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
2284
-                $body .= $this->LE . $this->LE;
2285
-                $body .= $this->textLine('--' . $this->boundary[1]);
2283
+                $body .= $this->LE.$this->LE;
2284
+                $body .= $this->textLine('--'.$this->boundary[1]);
2286 2285
                 $body .= $this->headerLine('Content-Type', 'multipart/related;');
2287
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2286
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2288 2287
                 $body .= $this->LE;
2289 2288
                 $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding);
2290 2289
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
2291
-                $body .= $this->LE . $this->LE;
2290
+                $body .= $this->LE.$this->LE;
2292 2291
                 $body .= $this->attachAll('inline', $this->boundary[2]);
2293 2292
                 $body .= $this->LE;
2294 2293
                 $body .= $this->endBoundary($this->boundary[1]);
2295 2294
                 break;
2296 2295
             case 'alt_attach':
2297 2296
                 $body .= $mimepre;
2298
-                $body .= $this->textLine('--' . $this->boundary[1]);
2297
+                $body .= $this->textLine('--'.$this->boundary[1]);
2299 2298
                 $body .= $this->headerLine('Content-Type', 'multipart/alternative;');
2300
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2299
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2301 2300
                 $body .= $this->LE;
2302 2301
                 $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding);
2303 2302
                 $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
2304
-                $body .= $this->LE . $this->LE;
2303
+                $body .= $this->LE.$this->LE;
2305 2304
                 $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding);
2306 2305
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
2307
-                $body .= $this->LE . $this->LE;
2306
+                $body .= $this->LE.$this->LE;
2308 2307
                 $body .= $this->endBoundary($this->boundary[2]);
2309 2308
                 $body .= $this->LE;
2310 2309
                 $body .= $this->attachAll('attachment', $this->boundary[1]);
2311 2310
                 break;
2312 2311
             case 'alt_inline_attach':
2313 2312
                 $body .= $mimepre;
2314
-                $body .= $this->textLine('--' . $this->boundary[1]);
2313
+                $body .= $this->textLine('--'.$this->boundary[1]);
2315 2314
                 $body .= $this->headerLine('Content-Type', 'multipart/alternative;');
2316
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
2315
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[2].'"');
2317 2316
                 $body .= $this->LE;
2318 2317
                 $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding);
2319 2318
                 $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
2320
-                $body .= $this->LE . $this->LE;
2321
-                $body .= $this->textLine('--' . $this->boundary[2]);
2319
+                $body .= $this->LE.$this->LE;
2320
+                $body .= $this->textLine('--'.$this->boundary[2]);
2322 2321
                 $body .= $this->headerLine('Content-Type', 'multipart/related;');
2323
-                $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"');
2322
+                $body .= $this->textLine("\tboundary=\"".$this->boundary[3].'"');
2324 2323
                 $body .= $this->LE;
2325 2324
                 $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding);
2326 2325
                 $body .= $this->encodeString($this->Body, $bodyEncoding);
2327
-                $body .= $this->LE . $this->LE;
2326
+                $body .= $this->LE.$this->LE;
2328 2327
                 $body .= $this->attachAll('inline', $this->boundary[3]);
2329 2328
                 $body .= $this->LE;
2330 2329
                 $body .= $this->endBoundary($this->boundary[2]);
@@ -2344,12 +2343,12 @@  discard block
 block discarded – undo
2344 2343
         } elseif ($this->sign_key_file) {
2345 2344
             try {
2346 2345
                 if (!defined('PKCS7_TEXT')) {
2347
-                    throw new phpmailerException($this->lang('extension_missing') . 'openssl');
2346
+                    throw new phpmailerException($this->lang('extension_missing').'openssl');
2348 2347
                 }
2349 2348
                 // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1
2350 2349
                 $file = tempnam(sys_get_temp_dir(), 'mail');
2351 2350
                 if (false === file_put_contents($file, $body)) {
2352
-                    throw new phpmailerException($this->lang('signing') . ' Could not write temp file');
2351
+                    throw new phpmailerException($this->lang('signing').' Could not write temp file');
2353 2352
                 }
2354 2353
                 $signed = tempnam(sys_get_temp_dir(), 'signed');
2355 2354
                 //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197
@@ -2357,16 +2356,16 @@  discard block
 block discarded – undo
2357 2356
                     $sign = @openssl_pkcs7_sign(
2358 2357
                         $file,
2359 2358
                         $signed,
2360
-                        'file://' . realpath($this->sign_cert_file),
2361
-                        array('file://' . realpath($this->sign_key_file), $this->sign_key_pass),
2359
+                        'file://'.realpath($this->sign_cert_file),
2360
+                        array('file://'.realpath($this->sign_key_file), $this->sign_key_pass),
2362 2361
                         null
2363 2362
                     );
2364 2363
                 } else {
2365 2364
                     $sign = @openssl_pkcs7_sign(
2366 2365
                         $file,
2367 2366
                         $signed,
2368
-                        'file://' . realpath($this->sign_cert_file),
2369
-                        array('file://' . realpath($this->sign_key_file), $this->sign_key_pass),
2367
+                        'file://'.realpath($this->sign_cert_file),
2368
+                        array('file://'.realpath($this->sign_key_file), $this->sign_key_pass),
2370 2369
                         null,
2371 2370
                         PKCS7_DETACHED,
2372 2371
                         $this->sign_extracerts_file
@@ -2378,12 +2377,12 @@  discard block
 block discarded – undo
2378 2377
                     @unlink($signed);
2379 2378
                     //The message returned by openssl contains both headers and body, so need to split them up
2380 2379
                     $parts = explode("\n\n", $body, 2);
2381
-                    $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE;
2380
+                    $this->MIMEHeader .= $parts[0].$this->LE.$this->LE;
2382 2381
                     $body = $parts[1];
2383 2382
                 } else {
2384 2383
                     @unlink($file);
2385 2384
                     @unlink($signed);
2386
-                    throw new phpmailerException($this->lang('signing') . openssl_error_string());
2385
+                    throw new phpmailerException($this->lang('signing').openssl_error_string());
2387 2386
                 }
2388 2387
             } catch (phpmailerException $exc) {
2389 2388
                 $body = '';
@@ -2416,7 +2415,7 @@  discard block
 block discarded – undo
2416 2415
         if ($encoding == '') {
2417 2416
             $encoding = $this->Encoding;
2418 2417
         }
2419
-        $result .= $this->textLine('--' . $boundary);
2418
+        $result .= $this->textLine('--'.$boundary);
2420 2419
         $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet);
2421 2420
         $result .= $this->LE;
2422 2421
         // RFC1341 part 5 says 7bit is assumed if not specified
@@ -2436,7 +2435,7 @@  discard block
 block discarded – undo
2436 2435
      */
2437 2436
     protected function endBoundary($boundary)
2438 2437
     {
2439
-        return $this->LE . '--' . $boundary . '--' . $this->LE;
2438
+        return $this->LE.'--'.$boundary.'--'.$this->LE;
2440 2439
     }
2441 2440
 
2442 2441
     /**
@@ -2473,7 +2472,7 @@  discard block
 block discarded – undo
2473 2472
      */
2474 2473
     public function headerLine($name, $value)
2475 2474
     {
2476
-        return $name . ': ' . $value . $this->LE;
2475
+        return $name.': '.$value.$this->LE;
2477 2476
     }
2478 2477
 
2479 2478
     /**
@@ -2484,7 +2483,7 @@  discard block
 block discarded – undo
2484 2483
      */
2485 2484
     public function textLine($value)
2486 2485
     {
2487
-        return $value . $this->LE;
2486
+        return $value.$this->LE;
2488 2487
     }
2489 2488
 
2490 2489
     /**
@@ -2503,7 +2502,7 @@  discard block
 block discarded – undo
2503 2502
     {
2504 2503
         try {
2505 2504
             if (!@is_file($path)) {
2506
-                throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE);
2505
+                throw new phpmailerException($this->lang('file_access').$path, self::STOP_CONTINUE);
2507 2506
             }
2508 2507
 
2509 2508
             // If a MIME type is not specified, try to work it out from the file name
@@ -2627,7 +2626,7 @@  discard block
 block discarded – undo
2627 2626
                             'Content-Disposition: %s; filename="%s"%s',
2628 2627
                             $disposition,
2629 2628
                             $encoded_name,
2630
-                            $this->LE . $this->LE
2629
+                            $this->LE.$this->LE
2631 2630
                         );
2632 2631
                     } else {
2633 2632
                         if (!empty($encoded_name)) {
@@ -2635,13 +2634,13 @@  discard block
 block discarded – undo
2635 2634
                                 'Content-Disposition: %s; filename=%s%s',
2636 2635
                                 $disposition,
2637 2636
                                 $encoded_name,
2638
-                                $this->LE . $this->LE
2637
+                                $this->LE.$this->LE
2639 2638
                             );
2640 2639
                         } else {
2641 2640
                             $mime[] = sprintf(
2642 2641
                                 'Content-Disposition: %s%s',
2643 2642
                                 $disposition,
2644
-                                $this->LE . $this->LE
2643
+                                $this->LE.$this->LE
2645 2644
                             );
2646 2645
                         }
2647 2646
                     }
@@ -2655,13 +2654,13 @@  discard block
 block discarded – undo
2655 2654
                     if ($this->isError()) {
2656 2655
                         return '';
2657 2656
                     }
2658
-                    $mime[] = $this->LE . $this->LE;
2657
+                    $mime[] = $this->LE.$this->LE;
2659 2658
                 } else {
2660 2659
                     $mime[] = $this->encodeFile($path, $encoding);
2661 2660
                     if ($this->isError()) {
2662 2661
                         return '';
2663 2662
                     }
2664
-                    $mime[] = $this->LE . $this->LE;
2663
+                    $mime[] = $this->LE.$this->LE;
2665 2664
                 }
2666 2665
             }
2667 2666
         }
@@ -2684,7 +2683,7 @@  discard block
 block discarded – undo
2684 2683
     {
2685 2684
         try {
2686 2685
             if (!is_readable($path)) {
2687
-                throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
2686
+                throw new phpmailerException($this->lang('file_open').$path, self::STOP_CONTINUE);
2688 2687
             }
2689 2688
             $magic_quotes = get_magic_quotes_runtime();
2690 2689
             if ($magic_quotes) {
@@ -2743,7 +2742,7 @@  discard block
 block discarded – undo
2743 2742
                 $encoded = $this->encodeQP($str);
2744 2743
                 break;
2745 2744
             default:
2746
-                $this->setError($this->lang('encoding') . $encoding);
2745
+                $this->setError($this->lang('encoding').$encoding);
2747 2746
                 break;
2748 2747
         }
2749 2748
         return $encoded;
@@ -2806,10 +2805,10 @@  discard block
 block discarded – undo
2806 2805
             $encoding = 'Q';
2807 2806
             $encoded = $this->encodeQ($str, $position);
2808 2807
             $encoded = $this->wrapText($encoded, $maxlen, true);
2809
-            $encoded = str_replace('=' . self::CRLF, "\n", trim($encoded));
2808
+            $encoded = str_replace('='.self::CRLF, "\n", trim($encoded));
2810 2809
         }
2811 2810
 
2812
-        $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded);
2811
+        $encoded = preg_replace('/^(.*)$/m', ' =?'.$this->CharSet."?$encoding?\\1?=", $encoded);
2813 2812
         $encoded = trim(str_replace("\n", $this->LE, $encoded));
2814 2813
 
2815 2814
         return $encoded;
@@ -2837,7 +2836,7 @@  discard block
 block discarded – undo
2837 2836
      */
2838 2837
     public function has8bitChars($text)
2839 2838
     {
2840
-        return (boolean)preg_match('/[\x80-\xFF]/', $text);
2839
+        return (boolean) preg_match('/[\x80-\xFF]/', $text);
2841 2840
     }
2842 2841
 
2843 2842
     /**
@@ -2852,7 +2851,7 @@  discard block
 block discarded – undo
2852 2851
      */
2853 2852
     public function base64EncodeWrapMB($str, $linebreak = null)
2854 2853
     {
2855
-        $start = '=?' . $this->CharSet . '?B?';
2854
+        $start = '=?'.$this->CharSet.'?B?';
2856 2855
         $end = '?=';
2857 2856
         $encoded = '';
2858 2857
         if ($linebreak === null) {
@@ -2875,7 +2874,7 @@  discard block
 block discarded – undo
2875 2874
                 $chunk = base64_encode($chunk);
2876 2875
                 $lookBack++;
2877 2876
             } while (strlen($chunk) > $length);
2878
-            $encoded .= $chunk . $linebreak;
2877
+            $encoded .= $chunk.$linebreak;
2879 2878
         }
2880 2879
 
2881 2880
         // Chomp the last linefeed
@@ -2904,7 +2903,7 @@  discard block
 block discarded – undo
2904 2903
             array(' ', "\r\n=2E", "\r\n", '='),
2905 2904
             rawurlencode($string)
2906 2905
         );
2907
-        return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string);
2906
+        return preg_replace('/[^\r\n]{'.($line_max - 3).'}[^=\r\n]{2}/', "$0=\r\n", $string);
2908 2907
     }
2909 2908
 
2910 2909
     /**
@@ -2953,7 +2952,7 @@  discard block
 block discarded – undo
2953 2952
             default:
2954 2953
                 // RFC 2047 section 5.1
2955 2954
                 // Replace every high ascii, control, =, ? and _ characters
2956
-                $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern;
2955
+                $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377'.$pattern;
2957 2956
                 break;
2958 2957
         }
2959 2958
         $matches = array();
@@ -2966,7 +2965,7 @@  discard block
 block discarded – undo
2966 2965
                 array_unshift($matches[0], '=');
2967 2966
             }
2968 2967
             foreach (array_unique($matches[0]) as $char) {
2969
-                $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);
2968
+                $encoded = str_replace($char, '='.sprintf('%02X', ord($char)), $encoded);
2970 2969
             }
2971 2970
         }
2972 2971
         // Replace every spaces to _ (more readable than =20)
@@ -3028,7 +3027,7 @@  discard block
 block discarded – undo
3028 3027
     public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')
3029 3028
     {
3030 3029
         if (!@is_file($path)) {
3031
-            $this->setError($this->lang('file_access') . $path);
3030
+            $this->setError($this->lang('file_access').$path);
3032 3031
             return false;
3033 3032
         }
3034 3033
 
@@ -3243,15 +3242,15 @@  discard block
 block discarded – undo
3243 3242
         if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
3244 3243
             $lasterror = $this->smtp->getError();
3245 3244
             if (!empty($lasterror['error'])) {
3246
-                $msg .= $this->lang('smtp_error') . $lasterror['error'];
3245
+                $msg .= $this->lang('smtp_error').$lasterror['error'];
3247 3246
                 if (!empty($lasterror['detail'])) {
3248
-                    $msg .= ' Detail: '. $lasterror['detail'];
3247
+                    $msg .= ' Detail: '.$lasterror['detail'];
3249 3248
                 }
3250 3249
                 if (!empty($lasterror['smtp_code'])) {
3251
-                    $msg .= ' SMTP code: ' . $lasterror['smtp_code'];
3250
+                    $msg .= ' SMTP code: '.$lasterror['smtp_code'];
3252 3251
                 }
3253 3252
                 if (!empty($lasterror['smtp_code_ex'])) {
3254
-                    $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex'];
3253
+                    $msg .= ' Additional SMTP info: '.$lasterror['smtp_code_ex'];
3255 3254
                 }
3256 3255
             }
3257 3256
         }
@@ -3310,7 +3309,7 @@  discard block
 block discarded – undo
3310 3309
                 //Include a link to troubleshooting docs on SMTP connection failure
3311 3310
                 //this is by far the biggest cause of support questions
3312 3311
                 //but it's usually not PHPMailer's fault.
3313
-                return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
3312
+                return $this->language[$key].' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
3314 3313
             }
3315 3314
             return $this->language[$key];
3316 3315
         } else {
@@ -3408,11 +3407,11 @@  discard block
 block discarded – undo
3408 3407
                     } else {
3409 3408
                         $data = rawurldecode($data);
3410 3409
                     }
3411
-                    $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
3412
-                    if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) {
3410
+                    $cid = md5($url).'@phpmailer.0'; // RFC2392 S 2
3411
+                    if ($this->addStringEmbeddedImage($data, $cid, 'embed'.$imgindex, 'base64', $match[1])) {
3413 3412
                         $message = str_replace(
3414 3413
                             $images[0][$imgindex],
3415
-                            $images[1][$imgindex] . '="cid:' . $cid . '"',
3414
+                            $images[1][$imgindex].'="cid:'.$cid.'"',
3416 3415
                             $message
3417 3416
                         );
3418 3417
                     }
@@ -3433,21 +3432,21 @@  discard block
 block discarded – undo
3433 3432
                     if ($directory == '.') {
3434 3433
                         $directory = '';
3435 3434
                     }
3436
-                    $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
3435
+                    $cid = md5($url).'@phpmailer.0'; // RFC2392 S 2
3437 3436
                     if (strlen($directory) > 1 && substr($directory, -1) != '/') {
3438 3437
                         $directory .= '/';
3439 3438
                     }
3440 3439
                     if ($this->addEmbeddedImage(
3441
-                        $basedir . $directory . $filename,
3440
+                        $basedir.$directory.$filename,
3442 3441
                         $cid,
3443 3442
                         $filename,
3444 3443
                         'base64',
3445
-                        self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION))
3444
+                        self::_mime_types((string) self::mb_pathinfo($filename, PATHINFO_EXTENSION))
3446 3445
                     )
3447 3446
                     ) {
3448 3447
                         $message = preg_replace(
3449
-                            '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui',
3450
-                            $images[1][$imgindex] . '="cid:' . $cid . '"',
3448
+                            '/'.$images[1][$imgindex].'=["\']'.preg_quote($url, '/').'["\']/Ui',
3449
+                            $images[1][$imgindex].'="cid:'.$cid.'"',
3451 3450
                             $message
3452 3451
                         );
3453 3452
                     }
@@ -3459,8 +3458,8 @@  discard block
 block discarded – undo
3459 3458
         $this->Body = $this->normalizeBreaks($message);
3460 3459
         $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));
3461 3460
         if (!$this->alternativeExists()) {
3462
-            $this->AltBody = 'To view this email message, open it in a program that understands HTML!' .
3463
-                self::CRLF . self::CRLF;
3461
+            $this->AltBody = 'To view this email message, open it in a program that understands HTML!'.
3462
+                self::CRLF.self::CRLF;
3464 3463
         }
3465 3464
         return $this->Body;
3466 3465
     }
@@ -3697,7 +3696,7 @@  discard block
 block discarded – undo
3697 3696
             $this->$name = $value;
3698 3697
             return true;
3699 3698
         } else {
3700
-            $this->setError($this->lang('variable_set') . $name);
3699
+            $this->setError($this->lang('variable_set').$name);
3701 3700
             return false;
3702 3701
         }
3703 3702
     }
@@ -3758,7 +3757,7 @@  discard block
 block discarded – undo
3758 3757
             if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) {
3759 3758
                 $line .= $txt[$i];
3760 3759
             } else {
3761
-                $line .= '=' . sprintf('%02X', $ord);
3760
+                $line .= '='.sprintf('%02X', $ord);
3762 3761
             }
3763 3762
         }
3764 3763
         return $line;
@@ -3775,7 +3774,7 @@  discard block
 block discarded – undo
3775 3774
     {
3776 3775
         if (!defined('PKCS7_TEXT')) {
3777 3776
             if ($this->exceptions) {
3778
-                throw new phpmailerException($this->lang('extension_missing') . 'openssl');
3777
+                throw new phpmailerException($this->lang('extension_missing').'openssl');
3779 3778
             }
3780 3779
             return '';
3781 3780
         }
@@ -3798,9 +3797,9 @@  discard block
 block discarded – undo
3798 3797
             $hash = hash('sha256', $signHeader);
3799 3798
             //'Magic' constant for SHA256 from RFC3447
3800 3799
             //@link https://tools.ietf.org/html/rfc3447#page-43
3801
-            $t = '3031300d060960864801650304020105000420' . $hash;
3800
+            $t = '3031300d060960864801650304020105000420'.$hash;
3802 3801
             $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3);
3803
-            $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);
3802
+            $eb = pack('H*', '0001'.str_repeat('FF', $pslen).'00'.$t);
3804 3803
 
3805 3804
             if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {
3806 3805
                 openssl_pkey_free($privKey);
@@ -3825,7 +3824,7 @@  discard block
 block discarded – undo
3825 3824
             list($heading, $value) = explode(':', $line, 2);
3826 3825
             $heading = strtolower($heading);
3827 3826
             $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces
3828
-            $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value
3827
+            $lines[$key] = $heading.':'.trim($value); // Don't forget to remove WSP around the value
3829 3828
         }
3830 3829
         $signHeader = implode("\r\n", $lines);
3831 3830
         return $signHeader;
@@ -3904,32 +3903,32 @@  discard block
 block discarded – undo
3904 3903
         if ('' == $this->DKIM_identity) {
3905 3904
             $ident = '';
3906 3905
         } else {
3907
-            $ident = ' i=' . $this->DKIM_identity . ';';
3908
-        }
3909
-        $dkimhdrs = 'DKIM-Signature: v=1; a=' .
3910
-            $DKIMsignatureType . '; q=' .
3911
-            $DKIMquery . '; l=' .
3912
-            $DKIMlen . '; s=' .
3913
-            $this->DKIM_selector .
3914
-            ";\r\n" .
3915
-            "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" .
3916
-            "\th=From:To:Date:Subject;\r\n" .
3917
-            "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" .
3918
-            "\tz=$from\r\n" .
3919
-            "\t|$to\r\n" .
3920
-            "\t|$date\r\n" .
3921
-            "\t|$subject;\r\n" .
3922
-            "\tbh=" . $DKIMb64 . ";\r\n" .
3906
+            $ident = ' i='.$this->DKIM_identity.';';
3907
+        }
3908
+        $dkimhdrs = 'DKIM-Signature: v=1; a='.
3909
+            $DKIMsignatureType.'; q='.
3910
+            $DKIMquery.'; l='.
3911
+            $DKIMlen.'; s='.
3912
+            $this->DKIM_selector.
3913
+            ";\r\n".
3914
+            "\tt=".$DKIMtime.'; c='.$DKIMcanonicalization.";\r\n".
3915
+            "\th=From:To:Date:Subject;\r\n".
3916
+            "\td=".$this->DKIM_domain.';'.$ident."\r\n".
3917
+            "\tz=$from\r\n".
3918
+            "\t|$to\r\n".
3919
+            "\t|$date\r\n".
3920
+            "\t|$subject;\r\n".
3921
+            "\tbh=".$DKIMb64.";\r\n".
3923 3922
             "\tb=";
3924 3923
         $toSign = $this->DKIM_HeaderC(
3925
-            $from_header . "\r\n" .
3926
-            $to_header . "\r\n" .
3927
-            $date_header . "\r\n" .
3928
-            $subject_header . "\r\n" .
3924
+            $from_header."\r\n".
3925
+            $to_header."\r\n".
3926
+            $date_header."\r\n".
3927
+            $subject_header."\r\n".
3929 3928
             $dkimhdrs
3930 3929
         );
3931 3930
         $signed = $this->DKIM_Sign($toSign);
3932
-        return $dkimhdrs . $signed . "\r\n";
3931
+        return $dkimhdrs.$signed."\r\n";
3933 3932
     }
3934 3933
 
3935 3934
     /**
@@ -3941,7 +3940,7 @@  discard block
 block discarded – undo
3941 3940
     public static function hasLineLongerThanMax($str)
3942 3941
     {
3943 3942
         //+2 to include CRLF line break for a 1000 total
3944
-        return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str);
3943
+        return (boolean) preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str);
3945 3944
     }
3946 3945
 
3947 3946
     /**
@@ -4030,7 +4029,7 @@  discard block
 block discarded – undo
4030 4029
      */
4031 4030
     public function errorMessage()
4032 4031
     {
4033
-        $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
4032
+        $errorMsg = '<strong>'.$this->getMessage()."</strong><br />\n";
4034 4033
         return $errorMsg;
4035 4034
     }
4036 4035
 }
Please login to merge, or discard this patch.