@@ -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); |
@@ -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(); |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | } else { |
| 89 | 89 | $this->copyHeader($from, $to, 'Content-Transfer-Encoding'); |
| 90 | 90 | } |
| 91 | - $rem = array_diff(self::$contentHeaders, [ 'Content-Type', 'Content-Transfer-Encoding']); |
|
| 91 | + $rem = array_diff(self::$contentHeaders, ['Content-Type', 'Content-Transfer-Encoding']); |
|
| 92 | 92 | foreach ($rem as $header) { |
| 93 | 93 | $this->copyHeader($from, $to, $header); |
| 94 | 94 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | return $this->getInstance( |
| 148 | 148 | 'partFilterFactory', |
| 149 | - __NAMESPACE__ . '\Message\PartFilterFactory' |
|
| 149 | + __NAMESPACE__.'\Message\PartFilterFactory' |
|
| 150 | 150 | ); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | { |
| 195 | 195 | return $this->getInstance( |
| 196 | 196 | 'streamFactory', |
| 197 | - __NAMESPACE__ . '\Stream\StreamFactory' |
|
| 197 | + __NAMESPACE__.'\Stream\StreamFactory' |
|
| 198 | 198 | ); |
| 199 | 199 | } |
| 200 | 200 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | } |
| 208 | 208 | return $this->getInstance( |
| 209 | 209 | 'partStreamFilterManagerFactory', |
| 210 | - __NAMESPACE__ . '\Message\Part\PartStreamFilterManagerFactory' |
|
| 210 | + __NAMESPACE__.'\Message\Part\PartStreamFilterManagerFactory' |
|
| 211 | 211 | ); |
| 212 | 212 | } |
| 213 | 213 | |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | protected function getTokenSplitPattern() |
| 89 | 89 | { |
| 90 | 90 | $sChars = implode('|', $this->getAllTokenSeparators()); |
| 91 | - return '~(' . $sChars . ')~'; |
|
| 91 | + return '~('.$sChars.')~'; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | $strValue = $ehloName; |
| 111 | 111 | if ($commentPart !== null && $this->matchHostPart($commentPart->getComment(), $hostname, $address)) { |
| 112 | - $strValue .= ' (' . $commentPart->getComment() . ')'; |
|
| 112 | + $strValue .= ' ('.$commentPart->getComment().')'; |
|
| 113 | 113 | $commentPart = null; |
| 114 | 114 | } |
| 115 | 115 | |
@@ -120,6 +120,6 @@ discard block |
||
| 120 | 120 | $hostname, |
| 121 | 121 | $address |
| 122 | 122 | ); |
| 123 | - return array_filter([ $domainPart, $commentPart ]); |
|
| 123 | + return array_filter([$domainPart, $commentPart]); |
|
| 124 | 124 | } |
| 125 | 125 | } |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | */ |
| 97 | 97 | protected function processParts(array $parts) |
| 98 | 98 | { |
| 99 | - return array_values(array_filter($parts, function ($part) { |
|
| 99 | + return array_values(array_filter($parts, function($part) { |
|
| 100 | 100 | if (empty($part) || $part instanceof CommentPart) { |
| 101 | 101 | return false; |
| 102 | 102 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | { |
| 47 | 47 | $sChars = implode('|', $this->getAllTokenSeparators()); |
| 48 | 48 | $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN_NO_QUOTES; |
| 49 | - return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~'; |
|
| 49 | + return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~'; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | public function add($name, $value) |
| 197 | 197 | { |
| 198 | 198 | $s = $this->getNormalizedHeaderName($name); |
| 199 | - $this->headers[$this->nextIndex] = [ $name, $value ]; |
|
| 199 | + $this->headers[$this->nextIndex] = [$name, $value]; |
|
| 200 | 200 | $this->headerObjects[$this->nextIndex] = null; |
| 201 | 201 | if (!isset($this->headerMap[$s])) { |
| 202 | 202 | $this->headerMap[$s] = []; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | return; |
| 225 | 225 | } |
| 226 | 226 | $i = $this->headerMap[$s][$offset]; |
| 227 | - $this->headers[$i] = [ $name, $value ]; |
|
| 227 | + $this->headers[$i] = [$name, $value]; |
|
| 228 | 228 | $this->headerObjects[$i] = null; |
| 229 | 229 | } |
| 230 | 230 | |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public function getHeaderObjects() |
| 238 | 238 | { |
| 239 | - return array_filter(array_map([ $this, 'getByIndex' ], array_keys($this->headers))); |
|
| 239 | + return array_filter(array_map([$this, 'getByIndex'], array_keys($this->headers))); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |