@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | protected function getTokenSeparators() |
| 42 | 42 | { |
| 43 | - return [ '\(', '\)' ]; |
|
| 43 | + return ['\(', '\)']; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -109,13 +109,13 @@ discard block |
||
| 109 | 109 | foreach ($parts as $part) { |
| 110 | 110 | // order is important here - CommentPart extends LiteralPart |
| 111 | 111 | if ($part instanceof CommentPart) { |
| 112 | - $comment .= '(' . $part->getComment() . ')'; |
|
| 112 | + $comment .= '('.$part->getComment().')'; |
|
| 113 | 113 | } elseif ($part instanceof LiteralPart) { |
| 114 | - $comment .= '"' . $part->getValue() . '"'; |
|
| 114 | + $comment .= '"'.$part->getValue().'"'; |
|
| 115 | 115 | } else { |
| 116 | 116 | $comment .= $part->getValue(); |
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | - return [ $this->partFactory->newCommentPart($comment) ]; |
|
| 119 | + return [$this->partFactory->newCommentPart($comment)]; |
|
| 120 | 120 | } |
| 121 | 121 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function getTokenSeparators() |
| 24 | 24 | { |
| 25 | - return [ '\s+', '<', '>' ]; |
|
| 25 | + return ['\s+', '<', '>']; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | { |
| 164 | 164 | $sChars = implode('|', $this->getAllTokenSeparators()); |
| 165 | 165 | $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN; |
| 166 | - return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~'; |
|
| 166 | + return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~'; |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | /** |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | return $consumer->parseTokensIntoParts($tokens); |
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | - return [ $this->getPartForToken($token, false) ]; |
|
| 252 | + return [$this->getPartForToken($token, false)]; |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | /** |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | { |
| 267 | 267 | $token = $tokens->current(); |
| 268 | 268 | if (strlen($token) === 2 && $token[0] === '\\') { |
| 269 | - return [ $this->getPartForToken(substr($token, 1), true) ]; |
|
| 269 | + return [$this->getPartForToken(substr($token, 1), true)]; |
|
| 270 | 270 | } |
| 271 | 271 | return $this->getConsumerTokenParts($tokens); |
| 272 | 272 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function getTokenSeparators() |
| 36 | 36 | { |
| 37 | - return [ ':', ';' ]; |
|
| 37 | + return [':', ';']; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -79,6 +79,6 @@ discard block |
||
| 79 | 79 | $emails[] = $part; |
| 80 | 80 | } |
| 81 | 81 | $group = $this->partFactory->newAddressGroupPart($emails); |
| 82 | - return [ $group ]; |
|
| 82 | + return [$group]; |
|
| 83 | 83 | } |
| 84 | 84 | } |
@@ -69,9 +69,9 @@ |
||
| 69 | 69 | return $this->part->getRawHeaderIterator(); |
| 70 | 70 | } elseif ($this->part->getParent() !== null && $this->part->getParent()->isMime()) { |
| 71 | 71 | return new ArrayIterator([ |
| 72 | - [ HeaderConsts::CONTENT_TYPE, $this->part->getContentType() ], |
|
| 73 | - [ HeaderConsts::CONTENT_DISPOSITION, $this->part->getContentDisposition() ], |
|
| 74 | - [ HeaderConsts::CONTENT_TRANSFER_ENCODING, $this->part->getContentTransferEncoding() ] |
|
| 72 | + [HeaderConsts::CONTENT_TYPE, $this->part->getContentType()], |
|
| 73 | + [HeaderConsts::CONTENT_DISPOSITION, $this->part->getContentDisposition()], |
|
| 74 | + [HeaderConsts::CONTENT_TRANSFER_ENCODING, $this->part->getContentTransferEncoding()] |
|
| 75 | 75 | ]); |
| 76 | 76 | } |
| 77 | 77 | return new ArrayIterator(); |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | return $this->partBuilder->getHeaderContainer(); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - public function getStream() |
|
| 96 | + public function getStream() |
|
| 97 | 97 | { |
| 98 | 98 | return $this->partBuilder->getStream(); |
| 99 | 99 | } |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | { |
| 136 | 136 | $stream = Utils::streamFor( |
| 137 | 137 | $resource, |
| 138 | - [ 'metadata' => [ 'mmp-detached-stream' => ($attached !== true) ] ] |
|
| 138 | + ['metadata' => ['mmp-detached-stream' => ($attached !== true)]] |
|
| 139 | 139 | ); |
| 140 | 140 | if (!$stream->isSeekable()) { |
| 141 | 141 | $stream = new CachingStream($stream); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $boundary = $part->getHeaderParameter(HeaderConsts::CONTENT_TYPE, 'boundary'); |
| 159 | 159 | if ($boundary === null) { |
| 160 | 160 | return array_map( |
| 161 | - function ($child) { |
|
| 161 | + function($child) { |
|
| 162 | 162 | return $child->getStream(); |
| 163 | 163 | }, |
| 164 | 164 | $part->getChildParts() |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $content = Psr7\Utils::streamFor(); |
| 189 | 189 | $this->writePartContentTo($content); |
| 190 | 190 | $content->rewind(); |
| 191 | - $streams = [ $this->streamFactory->newHeaderStream($this->part), $content ]; |
|
| 191 | + $streams = [$this->streamFactory->newHeaderStream($this->part), $content]; |
|
| 192 | 192 | |
| 193 | 193 | if ($this->part instanceof IMimePart && $this->part->getChildCount() > 0) { |
| 194 | 194 | $streams = array_merge($streams, $this->getBoundaryAndChildStreams($this->part)); |
@@ -123,8 +123,7 @@ discard block |
||
| 123 | 123 | public function getStream() |
| 124 | 124 | { |
| 125 | 125 | return ($this->parent !== null) ? |
| 126 | - $this->parent->getStream() : |
|
| 127 | - $this->messageStream; |
|
| 126 | + $this->parent->getStream() : $this->messageStream; |
|
| 128 | 127 | } |
| 129 | 128 | |
| 130 | 129 | /** |
@@ -136,8 +135,7 @@ discard block |
||
| 136 | 135 | public function getMessageResourceHandle() |
| 137 | 136 | { |
| 138 | 137 | return ($this->parent !== null) ? |
| 139 | - $this->parent->getMessageResourceHandle() : |
|
| 140 | - $this->messageHandle; |
|
| 138 | + $this->parent->getMessageResourceHandle() : $this->messageHandle; |
|
| 141 | 139 | } |
| 142 | 140 | |
| 143 | 141 | /** |