@@ -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); |