@@ -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 | } |
@@ -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)); |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function readEncodedChars($length, $pre = '') |
90 | 90 | { |
91 | - $str = $pre . $this->stream->read($length); |
|
91 | + $str = $pre.$this->stream->read($length); |
|
92 | 92 | $len = strlen($str); |
93 | 93 | if ($len > 0 && !preg_match('/^[0-9a-f]{2}$|^[\r\n].$/is', $str) && $this->stream->isSeekable()) { |
94 | 94 | $this->stream->seek(-$len, SEEK_CUR); |
95 | - return '3D'; // '=' character |
|
95 | + return '3D'; // '=' character |
|
96 | 96 | } |
97 | 97 | return $str; |
98 | 98 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function write($string) |
183 | 183 | { |
184 | 184 | $encodedLine = quoted_printable_encode($this->lastLine); |
185 | - $lineAndString = rtrim(quoted_printable_encode($this->lastLine . $string), "\r\n"); |
|
185 | + $lineAndString = rtrim(quoted_printable_encode($this->lastLine.$string), "\r\n"); |
|
186 | 186 | $write = substr($lineAndString, strlen($encodedLine)); |
187 | 187 | $this->stream->write($write); |
188 | 188 | $written = strlen($string); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | { |
222 | 222 | $encoded = preg_replace('/\r\n|\r|\n/', "\r\n", rtrim(convert_uuencode($bytes))); |
223 | 223 | // removes ending '`' line |
224 | - $this->stream->write("\r\n" . rtrim(substr($encoded, 0, -1))); |
|
224 | + $this->stream->write("\r\n".rtrim(substr($encoded, 0, -1))); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | */ |
235 | 235 | private function handleRemainder($string) |
236 | 236 | { |
237 | - $write = $this->remainder . $string; |
|
237 | + $write = $this->remainder.$string; |
|
238 | 238 | $nRem = strlen($write) % 45; |
239 | 239 | $this->remainder = ''; |
240 | 240 | if ($nRem !== 0) { |