@@ -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 = ''; |
@@ -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); |
@@ -68,12 +68,12 @@ |
||
68 | 68 | if ($this->tell() !== 0) { |
69 | 69 | $next = $this->lineLength - ($this->position % ($this->lineLength + $this->lineEndingLength)); |
70 | 70 | if (strlen($string) > $next) { |
71 | - $firstLine = substr($string, 0, $next) . $this->lineEnding; |
|
71 | + $firstLine = substr($string, 0, $next).$this->lineEnding; |
|
72 | 72 | $string = substr($string, $next); |
73 | 73 | } |
74 | 74 | } |
75 | 75 | // chunk_split always ends with the passed line ending |
76 | - $chunked = $firstLine . chunk_split($string, $this->lineLength, $this->lineEnding); |
|
76 | + $chunked = $firstLine.chunk_split($string, $this->lineLength, $this->lineEnding); |
|
77 | 77 | return substr($chunked, 0, strlen($chunked) - $this->lineEndingLength); |
78 | 78 | } |
79 | 79 |
@@ -154,7 +154,7 @@ |
||
154 | 154 | */ |
155 | 155 | public function write($string) |
156 | 156 | { |
157 | - $bytes = $this->remainder . $string; |
|
157 | + $bytes = $this->remainder.$string; |
|
158 | 158 | $len = strlen($bytes); |
159 | 159 | if (($len % 3) !== 0) { |
160 | 160 | $this->remainder = substr($bytes, -($len % 3)); |