@@ -167,7 +167,7 @@ |
||
| 167 | 167 | $this->contentHandle, |
| 168 | 168 | $this->charsetConversionFilter, |
| 169 | 169 | STREAM_FILTER_READ, |
| 170 | - [ 'from' => $fromCharset, 'to' => $toCharset ] |
|
| 170 | + ['from' => $fromCharset, 'to' => $toCharset] |
|
| 171 | 171 | ); |
| 172 | 172 | } |
| 173 | 173 | $this->charset['from'] = $fromCharset; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $pbChildren = $partBuilder->getChildren(); |
| 82 | 82 | if (!empty($pbChildren)) { |
| 83 | - $this->children = array_map(function ($child) use ($messageObjectId) { |
|
| 83 | + $this->children = array_map(function($child) use ($messageObjectId) { |
|
| 84 | 84 | $childPart = $child->createMessagePart($messageObjectId); |
| 85 | 85 | $childPart->parent = $this; |
| 86 | 86 | return $childPart; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | protected function getAllNonFilteredParts() |
| 100 | 100 | { |
| 101 | - $parts = [ $this ]; |
|
| 101 | + $parts = [$this]; |
|
| 102 | 102 | foreach ($this->children as $part) { |
| 103 | 103 | if ($part instanceof MimePart) { |
| 104 | 104 | $parts = array_merge( |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | if (!empty($filter)) { |
| 150 | 150 | return array_values(array_filter( |
| 151 | 151 | $parts, |
| 152 | - [ $filter, 'filter' ] |
|
| 152 | + [$filter, 'filter'] |
|
| 153 | 153 | )); |
| 154 | 154 | } |
| 155 | 155 | return $parts; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | public function getChildParts(PartFilter $filter = null) |
| 198 | 198 | { |
| 199 | 199 | if ($filter !== null) { |
| 200 | - return array_values(array_filter($this->children, [ $filter, 'filter' ])); |
|
| 200 | + return array_values(array_filter($this->children, [$filter, 'filter'])); |
|
| 201 | 201 | } |
| 202 | 202 | return $this->children; |
| 203 | 203 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | { |
| 168 | 168 | return $this->getInstance( |
| 169 | 169 | 'partFilterFactory', |
| 170 | - __NAMESPACE__ . '\Message\PartFilterFactory' |
|
| 170 | + __NAMESPACE__.'\Message\PartFilterFactory' |
|
| 171 | 171 | ); |
| 172 | 172 | } |
| 173 | 173 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | } |
| 224 | 224 | return $this->getInstance( |
| 225 | 225 | 'partStreamFilterManagerFactory', |
| 226 | - __NAMESPACE__ . '\Message\Part\PartStreamFilterManagerFactory' |
|
| 226 | + __NAMESPACE__.'\Message\Part\PartStreamFilterManagerFactory' |
|
| 227 | 227 | ); |
| 228 | 228 | } |
| 229 | 229 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | if ($this->partStreamRegistry === null) { |
| 239 | 239 | $this->registerStreamExtensions(); |
| 240 | 240 | } |
| 241 | - return $this->getInstance('partStreamRegistry', __NAMESPACE__ . '\Stream\PartStreamRegistry'); |
|
| 241 | + return $this->getInstance('partStreamRegistry', __NAMESPACE__.'\Stream\PartStreamRegistry'); |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | public function getCharsetConverter() |
@@ -297,9 +297,9 @@ discard block |
||
| 297 | 297 | protected function registerStreamExtensions() |
| 298 | 298 | { |
| 299 | 299 | stream_filter_register( |
| 300 | - UUDecodeStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__ . '\Stream\UUDecodeStreamFilter'); |
|
| 301 | - stream_filter_register(CharsetStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__ . '\Stream\CharsetStreamFilter'); |
|
| 302 | - stream_wrapper_register(PartStream::STREAM_WRAPPER_PROTOCOL, __NAMESPACE__ . '\Stream\PartStream'); |
|
| 300 | + UUDecodeStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__.'\Stream\UUDecodeStreamFilter'); |
|
| 301 | + stream_filter_register(CharsetStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__.'\Stream\CharsetStreamFilter'); |
|
| 302 | + stream_wrapper_register(PartStream::STREAM_WRAPPER_PROTOCOL, __NAMESPACE__.'\Stream\PartStream'); |
|
| 303 | 303 | |
| 304 | 304 | // originally created for HHVM compatibility, but decided to use them |
| 305 | 305 | // instead of built-in stream filters for reliability -- it seems the |
@@ -313,11 +313,11 @@ discard block |
||
| 313 | 313 | // filters, so now they're all named mmp-convert.* |
| 314 | 314 | stream_filter_register( |
| 315 | 315 | ConvertStreamFilter::STREAM_DECODER_FILTER_NAME, |
| 316 | - __NAMESPACE__ . '\Stream\ConvertStreamFilter' |
|
| 316 | + __NAMESPACE__.'\Stream\ConvertStreamFilter' |
|
| 317 | 317 | ); |
| 318 | 318 | stream_filter_register( |
| 319 | 319 | Base64DecodeStreamFilter::STREAM_FILTER_NAME, |
| 320 | - __NAMESPACE__ . '\Stream\Base64DecodeStreamFilter' |
|
| 320 | + __NAMESPACE__.'\Stream\Base64DecodeStreamFilter' |
|
| 321 | 321 | ); |
| 322 | 322 | } |
| 323 | 323 | } |
@@ -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 | } |
@@ -158,8 +158,8 @@ |
||
| 158 | 158 | ksort($parts); |
| 159 | 159 | return array_reduce( |
| 160 | 160 | $parts, |
| 161 | - function ($carry, $item) { |
|
| 162 | - return $carry . $item; |
|
| 161 | + function($carry, $item) { |
|
| 162 | + return $carry.$item; |
|
| 163 | 163 | }, |
| 164 | 164 | '' |
| 165 | 165 | ); |