@@ -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 | { |
@@ -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 | { |
@@ -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 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | { |
| 171 | 171 | return $this->getInstance( |
| 172 | 172 | 'partFilterFactory', |
| 173 | - __NAMESPACE__ . '\Message\PartFilterFactory' |
|
| 173 | + __NAMESPACE__.'\Message\PartFilterFactory' |
|
| 174 | 174 | ); |
| 175 | 175 | } |
| 176 | 176 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | return $this->getInstance( |
| 228 | 228 | 'partStreamFilterManagerFactory', |
| 229 | - __NAMESPACE__ . '\Message\Part\PartStreamFilterManagerFactory' |
|
| 229 | + __NAMESPACE__.'\Message\Part\PartStreamFilterManagerFactory' |
|
| 230 | 230 | ); |
| 231 | 231 | } |
| 232 | 232 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | if ($this->partStreamRegistry === null) { |
| 242 | 242 | $this->registerStreamExtensions(); |
| 243 | 243 | } |
| 244 | - return $this->getInstance('partStreamRegistry', __NAMESPACE__ . '\Stream\PartStreamRegistry'); |
|
| 244 | + return $this->getInstance('partStreamRegistry', __NAMESPACE__.'\Stream\PartStreamRegistry'); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | /** |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | public function getHeaderPartFactory() |
| 253 | 253 | { |
| 254 | - return $this->getInstance('headerPartFactory', __NAMESPACE__ . '\Header\Part\HeaderPartFactory'); |
|
| 254 | + return $this->getInstance('headerPartFactory', __NAMESPACE__.'\Header\Part\HeaderPartFactory'); |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | /** |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | public function getMimeLiteralPartFactory() |
| 263 | 263 | { |
| 264 | - return $this->getInstance('mimeLiteralPartFactory', __NAMESPACE__ . '\Header\Part\MimeLiteralPartFactory'); |
|
| 264 | + return $this->getInstance('mimeLiteralPartFactory', __NAMESPACE__.'\Header\Part\MimeLiteralPartFactory'); |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | /** |
@@ -289,9 +289,9 @@ discard block |
||
| 289 | 289 | protected function registerStreamExtensions() |
| 290 | 290 | { |
| 291 | 291 | stream_filter_register( |
| 292 | - UUDecodeStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__ . '\Stream\UUDecodeStreamFilter'); |
|
| 293 | - stream_filter_register(CharsetStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__ . '\Stream\CharsetStreamFilter'); |
|
| 294 | - stream_wrapper_register(PartStream::STREAM_WRAPPER_PROTOCOL, __NAMESPACE__ . '\Stream\PartStream'); |
|
| 292 | + UUDecodeStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__.'\Stream\UUDecodeStreamFilter'); |
|
| 293 | + stream_filter_register(CharsetStreamFilter::STREAM_FILTER_NAME, __NAMESPACE__.'\Stream\CharsetStreamFilter'); |
|
| 294 | + stream_wrapper_register(PartStream::STREAM_WRAPPER_PROTOCOL, __NAMESPACE__.'\Stream\PartStream'); |
|
| 295 | 295 | |
| 296 | 296 | // originally created for HHVM compatibility, but decided to use them |
| 297 | 297 | // instead of built-in stream filters for reliability -- it seems the |
@@ -305,11 +305,11 @@ discard block |
||
| 305 | 305 | // filters, so now they're all named mmp-convert.* |
| 306 | 306 | stream_filter_register( |
| 307 | 307 | ConvertStreamFilter::STREAM_DECODER_FILTER_NAME, |
| 308 | - __NAMESPACE__ . '\Stream\ConvertStreamFilter' |
|
| 308 | + __NAMESPACE__.'\Stream\ConvertStreamFilter' |
|
| 309 | 309 | ); |
| 310 | 310 | stream_filter_register( |
| 311 | 311 | Base64DecodeStreamFilter::STREAM_FILTER_NAME, |
| 312 | - __NAMESPACE__ . '\Stream\Base64DecodeStreamFilter' |
|
| 312 | + __NAMESPACE__.'\Stream\Base64DecodeStreamFilter' |
|
| 313 | 313 | ); |
| 314 | 314 | } |
| 315 | 315 | } |