@@ -110,9 +110,9 @@ |
||
| 110 | 110 | public function overwrite8bitContentEncoding(Message $message) |
| 111 | 111 | { |
| 112 | 112 | $parts = $message->getAllParts(new PartFilter([ |
| 113 | - 'headers' => [ PartFilter::FILTER_INCLUDE => [ |
|
| 113 | + 'headers' => [PartFilter::FILTER_INCLUDE => [ |
|
| 114 | 114 | 'Content-Transfer-Encoding' => '8bit' |
| 115 | - ] ] |
|
| 115 | + ]] |
|
| 116 | 116 | ])); |
| 117 | 117 | foreach ($parts as $part) { |
| 118 | 118 | $contentType = strtolower($part->getContentType()); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $boundary = $part->getHeaderParameter('Content-Type', 'boundary'); |
| 136 | 136 | if ($boundary === null) { |
| 137 | 137 | return array_map( |
| 138 | - function ($child) { |
|
| 138 | + function($child) { |
|
| 139 | 139 | return $child->getStream(); |
| 140 | 140 | }, |
| 141 | 141 | $part->getChildParts() |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $content = Psr7\stream_for(); |
| 166 | 166 | $this->writePartContentTo($content); |
| 167 | 167 | $content->rewind(); |
| 168 | - $streams = [ $this->streamFactory->newHeaderStream($this->part), $content ]; |
|
| 168 | + $streams = [$this->streamFactory->newHeaderStream($this->part), $content]; |
|
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | 171 | * @var ParentHeaderPart |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function getUniqueBoundary($mimeType) |
| 56 | 56 | { |
| 57 | 57 | $type = ltrim(strtoupper(preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-'); |
| 58 | - return uniqid('----=MMP-' . $type . '.', true); |
|
| 58 | + return uniqid('----=MMP-'.$type.'.', true); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $part->setRawHeader( |
| 71 | 71 | 'Content-Type', |
| 72 | 72 | "$mimeType;\r\n\tboundary=\"" |
| 73 | - . $this->getUniqueBoundary($mimeType) . '"' |
|
| 73 | + . $this->getUniqueBoundary($mimeType).'"' |
|
| 74 | 74 | ); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | public function createAndAddPartForAttachment(Message $message, $resource, $mimeType, $disposition, $filename = null) |
| 343 | 343 | { |
| 344 | 344 | if ($filename === null) { |
| 345 | - $filename = 'file' . uniqid(); |
|
| 345 | + $filename = 'file'.uniqid(); |
|
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | $safe = iconv('UTF-8', 'US-ASCII//translit//ignore', $filename); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | public function add($name, $value) |
| 126 | 126 | { |
| 127 | 127 | $s = $this->getNormalizedHeaderName($name); |
| 128 | - $this->headers[$this->nextIndex] = [ $name, $value ]; |
|
| 128 | + $this->headers[$this->nextIndex] = [$name, $value]; |
|
| 129 | 129 | $this->headerObjects[$this->nextIndex] = null; |
| 130 | 130 | if (!isset($this->headerMap[$s])) { |
| 131 | 131 | $this->headerMap[$s] = []; |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | return; |
| 143 | 143 | } |
| 144 | 144 | $i = $this->headerMap[$s][$offset]; |
| 145 | - $this->headers[$i] = [ $name, $value ]; |
|
| 145 | + $this->headers[$i] = [$name, $value]; |
|
| 146 | 146 | $this->headerObjects[$i] = null; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -54,9 +54,9 @@ |
||
| 54 | 54 | return $this->part->getRawHeaderIterator(); |
| 55 | 55 | } elseif ($this->part->getParent() !== null && $this->part->getParent()->isMime()) { |
| 56 | 56 | return new ArrayIterator([ |
| 57 | - [ 'Content-Type', $this->part->getContentType() ], |
|
| 58 | - [ 'Content-Disposition', $this->part->getContentDisposition() ], |
|
| 59 | - [ 'Content-Transfer-Encoding', $this->part->getContentTransferEncoding() ] |
|
| 57 | + ['Content-Type', $this->part->getContentType()], |
|
| 58 | + ['Content-Disposition', $this->part->getContentDisposition()], |
|
| 59 | + ['Content-Transfer-Encoding', $this->part->getContentTransferEncoding()] |
|
| 60 | 60 | ]); |
| 61 | 61 | } |
| 62 | 62 | return new ArrayIterator(); |