@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $this->children, |
103 | 103 | $index, |
104 | 104 | 0, |
105 | - [ $part ] |
|
105 | + [$part] |
|
106 | 106 | ); |
107 | 107 | } |
108 | 108 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | { |
138 | 138 | if (!$value instanceof IMessagePart) { |
139 | 139 | throw new InvalidArgumentException( |
140 | - get_class($value) . ' is not a ZBateson\MailMimeParser\Message\IMessagePart' |
|
140 | + get_class($value).' is not a ZBateson\MailMimeParser\Message\IMessagePart' |
|
141 | 141 | ); |
142 | 142 | } |
143 | 143 | $index = ($offset === null) ? count($this->children) : $offset; |
@@ -42,6 +42,6 @@ |
||
42 | 42 | foreach ($parts as $part) { |
43 | 43 | $strValue .= $part->getValue(); |
44 | 44 | } |
45 | - return [ $this->partFactory->newDatePart($strValue) ]; |
|
45 | + return [$this->partFactory->newDatePart($strValue)]; |
|
46 | 46 | } |
47 | 47 | } |
@@ -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(); |
@@ -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 | /** |