@@ -48,7 +48,7 @@  | 
                                                    ||
| 48 | 48 | $this->addRawHeaderToPart($header, $container);  | 
                                                        
| 49 | 49 | $header = '';  | 
                                                        
| 50 | 50 |              } else { | 
                                                        
| 51 | - $line = "\r\n" . $line;  | 
                                                        |
| 51 | + $line = "\r\n".$line;  | 
                                                        |
| 52 | 52 | }  | 
                                                        
| 53 | 53 | $header .= rtrim($line, "\r\n");  | 
                                                        
| 54 | 54 | } while ($header !== '');  | 
                                                        
@@ -23,7 +23,7 @@ discard block  | 
                                                    ||
| 23 | 23 | * @var string[] non mime content fields that are not related to the content  | 
                                                        
| 24 | 24 | * of a part.  | 
                                                        
| 25 | 25 | */  | 
                                                        
| 26 | - private static $nonMimeContentFields = [ 'contentreturn', 'contentidentifier' ];  | 
                                                        |
| 26 | + private static $nonMimeContentFields = ['contentreturn', 'contentidentifier'];  | 
                                                        |
| 27 | 27 | |
| 28 | 28 | /**  | 
                                                        
| 29 | 29 | * Returns true if the passed header's name is a Content-* header other than  | 
                                                        
@@ -96,7 +96,7 @@ discard block  | 
                                                    ||
| 96 | 96 | $this->copyHeader($from, $to, HeaderConsts::CONTENT_TRANSFER_ENCODING);  | 
                                                        
| 97 | 97 | }  | 
                                                        
| 98 | 98 |          foreach ($from->getAllHeaders() as $header) { | 
                                                        
| 99 | -            if ($this->isMimeContentField($header, [ 'contenttype', 'contenttransferencoding' ])) { | 
                                                        |
| 99 | +            if ($this->isMimeContentField($header, ['contenttype', 'contenttransferencoding'])) { | 
                                                        |
| 100 | 100 | $this->copyHeader($from, $to, $header->getName());  | 
                                                        
| 101 | 101 | }  | 
                                                        
| 102 | 102 | }  | 
                                                        
@@ -115,7 +115,7 @@  | 
                                                    ||
| 115 | 115 | *  | 
                                                        
| 116 | 116 | * @param IMimePart $part  | 
                                                        
| 117 | 117 | * @return IMimePart the newly-created IMimePart  | 
                                                        
| 118 | - */  | 
                                                        |
| 118 | + */  | 
                                                        |
| 119 | 119 | public function createNewContentPartFrom(IMimePart $part)  | 
                                                        
| 120 | 120 |      { | 
                                                        
| 121 | 121 | $mime = $this->mimePartFactory->newInstance();  | 
                                                        
@@ -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 | }  | 
                                                        
@@ -59,7 +59,7 @@ discard block  | 
                                                    ||
| 59 | 59 | */  | 
                                                        
| 60 | 60 | public function getTokenSeparators()  | 
                                                        
| 61 | 61 |      { | 
                                                        
| 62 | - return [ '<', '>', ',', ';', '\s+' ];  | 
                                                        |
| 62 | + return ['<', '>', ',', ';', '\s+'];  | 
                                                        |
| 63 | 63 | }  | 
                                                        
| 64 | 64 | |
| 65 | 65 | /**  | 
                                                        
@@ -141,6 +141,6 @@ discard block  | 
                                                    ||
| 141 | 141 | }  | 
                                                        
| 142 | 142 | $this->processSinglePart($part, $strName, $strValue);  | 
                                                        
| 143 | 143 | }  | 
                                                        
| 144 | - return [ $this->partFactory->newAddressPart($strName, $strValue) ];  | 
                                                        |
| 144 | + return [$this->partFactory->newAddressPart($strName, $strValue)];  | 
                                                        |
| 145 | 145 | }  | 
                                                        
| 146 | 146 | }  | 
                                                        
@@ -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 | /**  | 
                                                        
@@ -82,7 +82,7 @@  | 
                                                    ||
| 82 | 82 | * @param int $index  | 
                                                        
| 83 | 83 | * @param boolean $isEncoded  | 
                                                        
| 84 | 84 | * @return SplitParameterToken  | 
                                                        
| 85 | - */  | 
                                                        |
| 85 | + */  | 
                                                        |
| 86 | 86 | private function addToSplitPart(ArrayObject $splitParts, $name, $value, $index, $isEncoded)  | 
                                                        
| 87 | 87 |      { | 
                                                        
| 88 | 88 | $ret = null;  | 
                                                        
@@ -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 | }  |