@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * |
| 89 | 89 | * @param ParentHeaderPart $part |
| 90 | 90 | * @return MimePart the newly-created MimePart |
| 91 | - */ |
|
| 91 | + */ |
|
| 92 | 92 | public function createNewContentPartFrom(ParentHeaderPart $part) |
| 93 | 93 | { |
| 94 | 94 | $mime = $this->partBuilderFactory->newPartBuilder($this->mimePartFactory)->createMessagePart(); |
@@ -105,9 +105,9 @@ |
||
| 105 | 105 | public function overwrite8bitContentEncoding(Message $message) |
| 106 | 106 | { |
| 107 | 107 | $parts = $message->getAllParts(new PartFilter([ |
| 108 | - 'headers' => [ PartFilter::FILTER_INCLUDE => [ |
|
| 108 | + 'headers' => [PartFilter::FILTER_INCLUDE => [ |
|
| 109 | 109 | 'Content-Transfer-Encoding' => '8bit' |
| 110 | - ] ] |
|
| 110 | + ]] |
|
| 111 | 111 | ])); |
| 112 | 112 | foreach ($parts as $part) { |
| 113 | 113 | $contentType = strtolower($part->getHeaderValue('Content-Type', 'text/plain')); |
@@ -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 | |
@@ -34,9 +34,9 @@ |
||
| 34 | 34 | return $this->part->getRawHeaders(); |
| 35 | 35 | } elseif ($this->part->getParent() !== null && $this->part->getParent()->isMime()) { |
| 36 | 36 | return [ |
| 37 | - [ 'Content-Type', $this->part->getContentType() ], |
|
| 38 | - [ 'Content-Disposition', $this->part->getContentDisposition() ], |
|
| 39 | - [ 'Content-Transfer-Encoding', $this->part->getContentTransferEncoding() ] |
|
| 37 | + ['Content-Type', $this->part->getContentType()], |
|
| 38 | + ['Content-Disposition', $this->part->getContentDisposition()], |
|
| 39 | + ['Content-Transfer-Encoding', $this->part->getContentTransferEncoding()] |
|
| 40 | 40 | ]; |
| 41 | 41 | } |
| 42 | 42 | return []; |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | $content = Psr7\stream_for(); |
| 140 | 140 | $this->writePartContentTo($this->part, $content); |
| 141 | 141 | $content->rewind(); |
| 142 | - $streams = [ new HeaderStream($this->part), $content ]; |
|
| 142 | + $streams = [new HeaderStream($this->part), $content]; |
|
| 143 | 143 | |
| 144 | 144 | if ($this->part instanceof ParentHeaderPart) { |
| 145 | 145 | $streams = array_merge($streams, $this->getBoundaryAndChildStreams($this->part)); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | ); |
| 163 | 163 | return array_values(array_filter( |
| 164 | 164 | $parts, |
| 165 | - function ($part) { |
|
| 165 | + function($part) { |
|
| 166 | 166 | return !( |
| 167 | 167 | $part->isTextPart() |
| 168 | 168 | && $part->getContentDisposition() === 'inline' |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | public function addAttachmentPart($stringOrHandle, $mimeType, $filename = null, $disposition = 'attachment') |
| 396 | 396 | { |
| 397 | 397 | if ($filename === null) { |
| 398 | - $filename = 'file' . uniqid(); |
|
| 398 | + $filename = 'file'.uniqid(); |
|
| 399 | 399 | } |
| 400 | 400 | $part = $this->messageHelperService |
| 401 | 401 | ->getMultipartHelper() |