@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | public function getUniqueBoundary($mimeType) |
58 | 58 | { |
59 | 59 | $type = ltrim(strtoupper(preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-'); |
60 | - return uniqid('----=MMP-' . $type . '.', true); |
|
60 | + return uniqid('----=MMP-'.$type.'.', true); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $part->setRawHeader( |
73 | 73 | 'Content-Type', |
74 | 74 | "$mimeType;\r\n\tboundary=\"" |
75 | - . $this->getUniqueBoundary($mimeType) . '"' |
|
75 | + . $this->getUniqueBoundary($mimeType).'"' |
|
76 | 76 | ); |
77 | 77 | } |
78 | 78 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | public function createAndAddPartForAttachment(Message $message, $resource, $mimeType, $disposition, $filename = null, $encoding = 'base64') |
346 | 346 | { |
347 | 347 | if ($filename === null) { |
348 | - $filename = 'file' . uniqid(); |
|
348 | + $filename = 'file'.uniqid(); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | $safe = iconv('UTF-8', 'US-ASCII//translit//ignore', $filename); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $s = $this->headerFactory->getNormalizedHeaderName($name); |
90 | 90 | if (isset($this->headerMap[$s])) { |
91 | 91 | $self = $this; |
92 | - $filtered = array_filter($this->headerMap[$s], function ($h) use ($name, $self) { |
|
92 | + $filtered = array_filter($this->headerMap[$s], function($h) use ($name, $self) { |
|
93 | 93 | return (strcasecmp($self->headers[$h][0], $name) === 0); |
94 | 94 | }); |
95 | 95 | return (!empty($filtered)) ? $filtered : $this->headerMap[$s]; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $a = $this->getAllWithOriginalHeaderNameIfSet($name); |
129 | 129 | if (!empty($a)) { |
130 | 130 | $self = $this; |
131 | - return array_map(function ($index) use ($self) { |
|
131 | + return array_map(function($index) use ($self) { |
|
132 | 132 | return $self->getByIndex($index); |
133 | 133 | }, $a); |
134 | 134 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | public function add($name, $value) |
208 | 208 | { |
209 | 209 | $s = $this->headerFactory->getNormalizedHeaderName($name); |
210 | - $this->headers[$this->nextIndex] = [ $name, $value ]; |
|
210 | + $this->headers[$this->nextIndex] = [$name, $value]; |
|
211 | 211 | $this->headerObjects[$this->nextIndex] = null; |
212 | 212 | if (!isset($this->headerMap[$s])) { |
213 | 213 | $this->headerMap[$s] = []; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | return; |
236 | 236 | } |
237 | 237 | $i = $this->headerMap[$s][$offset]; |
238 | - $this->headers[$i] = [ $name, $value ]; |
|
238 | + $this->headers[$i] = [$name, $value]; |
|
239 | 239 | $this->headerObjects[$i] = null; |
240 | 240 | } |
241 | 241 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | public function getHeaderObjects() |
249 | 249 | { |
250 | - return array_filter(array_map([ $this, 'getByIndex' ], array_keys($this->headers))); |
|
250 | + return array_filter(array_map([$this, 'getByIndex'], array_keys($this->headers))); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |