@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public function getUniqueBoundary(string $mimeType) : string |
45 | 45 | { |
46 | 46 | $type = \ltrim(\strtoupper(\preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-'); |
47 | - return \uniqid('----=MMP-' . $type . '-', true); |
|
47 | + return \uniqid('----=MMP-'.$type.'-', true); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $part->setRawHeader( |
57 | 57 | HeaderConsts::CONTENT_TYPE, |
58 | 58 | "$mimeType;\r\n\tboundary=\"" |
59 | - . $this->getUniqueBoundary($mimeType) . '"' |
|
59 | + . $this->getUniqueBoundary($mimeType).'"' |
|
60 | 60 | ); |
61 | 61 | $part->notify(); |
62 | 62 | return $this; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | public function createAndAddPartForAttachment(IMessage $message, $resource, string $mimeType, string $disposition, ?string $filename = null, string $encoding = 'base64') |
298 | 298 | { |
299 | 299 | if ($filename === null) { |
300 | - $filename = 'file' . \uniqid(); |
|
300 | + $filename = 'file'.\uniqid(); |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | $safe = \iconv('UTF-8', 'US-ASCII//translit//ignore', $filename); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @param HeaderPart[] $parts |
86 | 86 | * @param HeaderPart[] $retParts |
87 | 87 | */ |
88 | - private function addSpaceToRetParts(array $parts, array &$retParts, int $curIndex, HeaderPart &$spacePart, HeaderPart $lastPart) : self |
|
88 | + private function addSpaceToRetParts(array $parts, array &$retParts, int $curIndex, HeaderPart & $spacePart, HeaderPart $lastPart) : self |
|
89 | 89 | { |
90 | 90 | $nextPart = $parts[$curIndex]; |
91 | 91 | if ($this->shouldAddSpace($nextPart, $lastPart)) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @param HeaderPart[] $retParts |
107 | 107 | * @param HeaderPart $spacePart |
108 | 108 | */ |
109 | - private function addSpaces(array $parts, array &$retParts, int $curIndex, ?HeaderPart &$spacePart = null) : self |
|
109 | + private function addSpaces(array $parts, array &$retParts, int $curIndex, ?HeaderPart & $spacePart = null) : self |
|
110 | 110 | { |
111 | 111 | $lastPart = \end($retParts); |
112 | 112 | if ($spacePart !== null && $curIndex < \count($parts) && $parts[$curIndex]->getValue() !== '' && $lastPart !== false) { |
@@ -44,7 +44,7 @@ |
||
44 | 44 | protected function setParseHeaderValue(AbstractConsumer $consumer) |
45 | 45 | { |
46 | 46 | $value = $this->rawValue; |
47 | - $matchp = '~' . MimeLiteralPart::MIME_PART_PATTERN . '~'; |
|
47 | + $matchp = '~'.MimeLiteralPart::MIME_PART_PATTERN.'~'; |
|
48 | 48 | $value = \preg_replace_callback($matchp, function($matches) { |
49 | 49 | return $this->mimeLiteralPartFactory->newInstance($matches[0]); |
50 | 50 | }, $value); |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Sets the unix file mode for the uuencoded 'begin' line. |
42 | - * |
|
43 | - * @return static |
|
42 | + * |
|
43 | + * @return static |
|
44 | 44 | */ |
45 | 45 | public function setUnixFileMode(int $mode) |
46 | 46 | { |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
63 | - * Sets the filename included in the uuencoded 'begin' line. |
|
64 | - * |
|
63 | + * Sets the filename included in the uuencoded 'begin' line. |
|
64 | + * |
|
65 | 65 | * @return static |
66 | 66 | */ |
67 | 67 | public function setFilename(string $filename) |
@@ -255,9 +255,9 @@ |
||
255 | 255 | return \count($this->getAllAttachmentParts()); |
256 | 256 | } |
257 | 257 | |
258 | - /** |
|
259 | - * @return static |
|
260 | - */ |
|
258 | + /** |
|
259 | + * @return static |
|
260 | + */ |
|
261 | 261 | public function addAttachmentPart($resource, string $mimeType, ?string $filename = null, string $disposition = 'attachment', string $encoding = 'base64') |
262 | 262 | { |
263 | 263 | $this->multipartHelper |