@@ -101,7 +101,7 @@ |
||
101 | 101 | $this->addRawHeaderToPart($header, $partBuilder); |
102 | 102 | $header = ''; |
103 | 103 | } else { |
104 | - $line = "\r\n" . $line; |
|
104 | + $line = "\r\n".$line; |
|
105 | 105 | } |
106 | 106 | $header .= rtrim($line, "\r\n"); |
107 | 107 | } while ($header !== ''); |
@@ -213,7 +213,6 @@ |
||
213 | 213 | * |
214 | 214 | * @param resource $handle |
215 | 215 | * @param PartBuilder $partBuilder |
216 | - * @param boolean $isMessage |
|
217 | 216 | */ |
218 | 217 | protected function readPart($handle, PartBuilder $partBuilder) |
219 | 218 | { |
@@ -339,8 +339,8 @@ discard block |
||
339 | 339 | if ($this->streamPartEndPos === 0) { |
340 | 340 | return null; |
341 | 341 | } |
342 | - return $this->streamWrapperProtocol . '://' . $messageObjectId |
|
343 | - . '?start=' . $this->streamPartStartPos . '&end=' |
|
342 | + return $this->streamWrapperProtocol.'://'.$messageObjectId |
|
343 | + . '?start='.$this->streamPartStartPos.'&end=' |
|
344 | 344 | . $this->streamPartEndPos; |
345 | 345 | } |
346 | 346 | |
@@ -356,8 +356,8 @@ discard block |
||
356 | 356 | if ($this->streamContentEndPos === 0) { |
357 | 357 | return null; |
358 | 358 | } |
359 | - return $this->streamWrapperProtocol . '://' . $messageObjectId |
|
360 | - . '?start=' . $this->streamContentStartPos . '&end=' |
|
359 | + return $this->streamWrapperProtocol.'://'.$messageObjectId |
|
360 | + . '?start='.$this->streamContentStartPos.'&end=' |
|
361 | 361 | . $this->streamContentEndPos; |
362 | 362 | } |
363 | 363 |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * Sets the specified property denoted by $name to $value. |
168 | 168 | * |
169 | 169 | * @param string $name |
170 | - * @param mixed $value |
|
170 | + * @param string $value |
|
171 | 171 | */ |
172 | 172 | public function setProperty($name, $value) |
173 | 173 | { |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * Returns the value of the property with the given $name. |
179 | 179 | * |
180 | 180 | * @param string $name |
181 | - * @return mixed |
|
181 | + * @return null|string |
|
182 | 182 | */ |
183 | 183 | public function getProperty($name) |
184 | 184 | { |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | /** |
192 | 192 | * Registers the passed PartBuilder as a child of the current PartBuilder. |
193 | 193 | * |
194 | - * @param \ZBateson\MailMimeParser\Message\PartBuilder $partBuilder |
|
194 | + * @param PartBuilder $partBuilder |
|
195 | 195 | */ |
196 | 196 | public function addChild(PartBuilder $partBuilder) |
197 | 197 | { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | /** |
206 | 206 | * Returns all children PartBuilder objects. |
207 | 207 | * |
208 | - * @return \ZBateson\MailMimeParser\Message\PartBuilder[] |
|
208 | + * @return PartBuilder[] |
|
209 | 209 | */ |
210 | 210 | public function getChildren() |
211 | 211 | { |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | * set to true (i.e. this isn't a discardable part following the parent's |
346 | 346 | * end boundary line). |
347 | 347 | * |
348 | - * @return booelan |
|
348 | + * @return boolean |
|
349 | 349 | */ |
350 | 350 | public function canHaveHeaders() |
351 | 351 | { |
@@ -181,7 +181,7 @@ |
||
181 | 181 | ); |
182 | 182 | return array_values(array_filter( |
183 | 183 | $parts, |
184 | - function ($part) { |
|
184 | + function($part) { |
|
185 | 185 | return !( |
186 | 186 | $part->isTextPart() |
187 | 187 | && $part->getContentDisposition() === 'inline' |
@@ -167,7 +167,7 @@ |
||
167 | 167 | $this->contentHandle, |
168 | 168 | $this->charsetConversionFilter, |
169 | 169 | STREAM_FILTER_READ, |
170 | - [ 'from' => $fromCharset, 'to' => $toCharset ] |
|
170 | + ['from' => $fromCharset, 'to' => $toCharset] |
|
171 | 171 | ); |
172 | 172 | } |
173 | 173 | $this->charset['from'] = $fromCharset; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | $pbChildren = $partBuilder->getChildren(); |
82 | 82 | if (!empty($pbChildren)) { |
83 | - $this->children = array_map(function ($child) use ($messageObjectId) { |
|
83 | + $this->children = array_map(function($child) use ($messageObjectId) { |
|
84 | 84 | $childPart = $child->createMessagePart($messageObjectId); |
85 | 85 | $childPart->parent = $this; |
86 | 86 | return $childPart; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function getAllNonFilteredParts() |
100 | 100 | { |
101 | - $parts = [ $this ]; |
|
101 | + $parts = [$this]; |
|
102 | 102 | foreach ($this->children as $part) { |
103 | 103 | if ($part instanceof MimePart) { |
104 | 104 | $parts = array_merge( |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if (!empty($filter)) { |
150 | 150 | return array_values(array_filter( |
151 | 151 | $parts, |
152 | - [ $filter, 'filter' ] |
|
152 | + [$filter, 'filter'] |
|
153 | 153 | )); |
154 | 154 | } |
155 | 155 | return $parts; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | public function getChildParts(PartFilter $filter = null) |
198 | 198 | { |
199 | 199 | if ($filter !== null) { |
200 | - return array_values(array_filter($this->children, [ $filter, 'filter' ])); |
|
200 | + return array_values(array_filter($this->children, [$filter, 'filter'])); |
|
201 | 201 | } |
202 | 202 | return $this->children; |
203 | 203 | } |