@@ -278,9 +278,9 @@ discard block |
||
278 | 278 | |
279 | 279 | // maps |
280 | 280 | protected $mappedRequestedCharsets = [ |
281 | - 'UTF-8' => [ true, 'UTF-8' ], |
|
282 | - 'US-ASCII' => [ true, 'US-ASCII' ], |
|
283 | - 'ISO-8859-1' => [ true, 'ISO-8859-1' ], |
|
281 | + 'UTF-8' => [true, 'UTF-8'], |
|
282 | + 'US-ASCII' => [true, 'US-ASCII'], |
|
283 | + 'ISO-8859-1' => [true, 'ISO-8859-1'], |
|
284 | 284 | ]; |
285 | 285 | |
286 | 286 | /** |
@@ -307,14 +307,14 @@ discard block |
||
307 | 307 | if ($str !== '') { |
308 | 308 | if ($fromMbSupported && !$toMbSupported) { |
309 | 309 | $str = mb_convert_encoding($str, 'UTF-8', $from); |
310 | - return iconv('UTF-8', $to . '//TRANSLIT//IGNORE', $str); |
|
310 | + return iconv('UTF-8', $to.'//TRANSLIT//IGNORE', $str); |
|
311 | 311 | } elseif (!$fromMbSupported && $toMbSupported) { |
312 | 312 | $str = iconv($from, 'UTF-8//TRANSLIT//IGNORE', $str); |
313 | 313 | return mb_convert_encoding($str, $to, 'UTF-8'); |
314 | 314 | } elseif ($fromMbSupported && $toMbSupported) { |
315 | 315 | return mb_convert_encoding($str, $to, $from); |
316 | 316 | } |
317 | - return iconv($from, $to . '//TRANSLIT//IGNORE', $str); |
|
317 | + return iconv($from, $to.'//TRANSLIT//IGNORE', $str); |
|
318 | 318 | } |
319 | 319 | return $str; |
320 | 320 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | $encoded = preg_replace('/\r\n|\r|\n/', "\r\n", rtrim(convert_uuencode($bytes))); |
210 | 210 | // removes ending '`' line |
211 | - $this->writeRaw("\r\n" . rtrim(substr($encoded, 0, -1))); |
|
211 | + $this->writeRaw("\r\n".rtrim(substr($encoded, 0, -1))); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | if ($this->position === 0) { |
233 | 233 | $this->writeUUHeader(); |
234 | 234 | } |
235 | - $write = $this->remainder . $string; |
|
235 | + $write = $this->remainder.$string; |
|
236 | 236 | $nRem = strlen($write) % 45; |
237 | 237 | |
238 | 238 | $this->remainder = ''; |
@@ -201,8 +201,8 @@ |
||
201 | 201 | */ |
202 | 202 | private function writeUUFooter() |
203 | 203 | { |
204 | - $this->writeRaw("\r\n`\r\nend"); |
|
205 | - $this->footerWritten = true; |
|
204 | + $this->writeRaw("\r\n`\r\nend"); |
|
205 | + $this->footerWritten = true; |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
@@ -161,11 +161,11 @@ discard block |
||
161 | 161 | if ($this->writePosition !== 0) { |
162 | 162 | $next = 76 - ($this->writePosition % 78); |
163 | 163 | if (strlen($encoded) > $next) { |
164 | - $firstLine = substr($encoded, 0, $next) . "\r\n"; |
|
164 | + $firstLine = substr($encoded, 0, $next)."\r\n"; |
|
165 | 165 | $encoded = substr($encoded, $next); |
166 | 166 | } |
167 | 167 | } |
168 | - $write = $firstLine . rtrim(chunk_split($encoded, 76)); |
|
168 | + $write = $firstLine.rtrim(chunk_split($encoded, 76)); |
|
169 | 169 | $this->writePosition += strlen($write); |
170 | 170 | return $write; |
171 | 171 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function write($string) |
190 | 190 | { |
191 | - $bytes = $this->remainder . $string; |
|
191 | + $bytes = $this->remainder.$string; |
|
192 | 192 | $len = strlen($bytes); |
193 | 193 | if (($len % 3) !== 0) { |
194 | 194 | $this->remainder = substr($bytes, -($len % 3)); |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | */ |
45 | 45 | private function readEncodedChars($length, $pre = '') |
46 | 46 | { |
47 | - $str = $pre . $this->readRaw($length); |
|
47 | + $str = $pre.$this->readRaw($length); |
|
48 | 48 | $len = strlen($str); |
49 | 49 | if ($len > 0 && !preg_match('/^[0-9a-f]{2}$|^[\r\n].$/is', $str)) { |
50 | 50 | $this->seekRaw(-$len, SEEK_CUR); |
51 | - return '3D'; // '=' character |
|
51 | + return '3D'; // '=' character |
|
52 | 52 | } |
53 | 53 | return $str; |
54 | 54 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function write($string) |
139 | 139 | { |
140 | 140 | $encodedLine = quoted_printable_encode($this->lastLine); |
141 | - $lineAndString = rtrim(quoted_printable_encode($this->lastLine . $string), "\r\n"); |
|
141 | + $lineAndString = rtrim(quoted_printable_encode($this->lastLine.$string), "\r\n"); |
|
142 | 142 | $write = substr($lineAndString, strlen($encodedLine)); |
143 | 143 | $this->writeRaw($write); |
144 | 144 | $written = strlen($string); |