@@ -109,9 +109,9 @@  | 
                                                    ||
| 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 | }  | 
                                                        
@@ -63,6 +63,6 @@  | 
                                                    ||
| 63 | 63 | protected function getTokenSplitPattern()  | 
                                                        
| 64 | 64 |      { | 
                                                        
| 65 | 65 |          $sChars = implode('|', $this->getAllTokenSeparators()); | 
                                                        
| 66 | -        return '~(' . $sChars . ')~'; | 
                                                        |
| 66 | +        return '~('.$sChars.')~'; | 
                                                        |
| 67 | 67 | }  | 
                                                        
| 68 | 68 | }  | 
                                                        
@@ -166,7 +166,7 @@  | 
                                                    ||
| 166 | 166 |      { | 
                                                        
| 167 | 167 |          $sChars = implode('|', $this->getAllTokenSeparators()); | 
                                                        
| 168 | 168 | $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN;  | 
                                                        
| 169 | -        return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~'; | 
                                                        |
| 169 | +        return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~'; | 
                                                        |
| 170 | 170 | }  | 
                                                        
| 171 | 171 | |
| 172 | 172 | /**  | 
                                                        
@@ -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 !== '');  | 
                                                        
@@ -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'  | 
                                                        
@@ -158,8 +158,8 @@  | 
                                                    ||
| 158 | 158 | ksort($parts);  | 
                                                        
| 159 | 159 | return array_reduce(  | 
                                                        
| 160 | 160 | $parts,  | 
                                                        
| 161 | -            function ($carry, $item) { | 
                                                        |
| 162 | - return $carry . $item;  | 
                                                        |
| 161 | +            function($carry, $item) { | 
                                                        |
| 162 | + return $carry.$item;  | 
                                                        |
| 163 | 163 | },  | 
                                                        
| 164 | 164 | ''  | 
                                                        
| 165 | 165 | );  | 
                                                        
@@ -168,7 +168,7 @@ discard block  | 
                                                    ||
| 168 | 168 | */  | 
                                                        
| 169 | 169 | public function __construct(array $filter = [])  | 
                                                        
| 170 | 170 |      { | 
                                                        
| 171 | - $params = [ 'hascontent', 'multipart', 'textpart', 'signedpart', 'headers' ];  | 
                                                        |
| 171 | + $params = ['hascontent', 'multipart', 'textpart', 'signedpart', 'headers'];  | 
                                                        |
| 172 | 172 |          foreach ($params as $param) { | 
                                                        
| 173 | 173 |              if (isset($filter[$param])) { | 
                                                        
| 174 | 174 | $this->__set($param, $filter[$param]);  | 
                                                        
@@ -190,8 +190,8 @@ discard block  | 
                                                    ||
| 190 | 190 |          if (!in_array($value, $valid)) { | 
                                                        
| 191 | 191 | $last = array_pop($valid);  | 
                                                        
| 192 | 192 | throw new InvalidArgumentException(  | 
                                                        
| 193 | - '$value parameter for ' . $name . ' must be one of '  | 
                                                        |
| 194 | -                . join(', ', $valid) . ' or ' . $last . ' - "' . $value | 
                                                        |
| 193 | + '$value parameter for '.$name.' must be one of '  | 
                                                        |
| 194 | +                . join(', ', $valid).' or '.$last.' - "'.$value | 
                                                        |
| 195 | 195 | . '" provided'  | 
                                                        
| 196 | 196 | );  | 
                                                        
| 197 | 197 | }  | 
                                                        
@@ -206,11 +206,11 @@ discard block  | 
                                                    ||
| 206 | 206 | */  | 
                                                        
| 207 | 207 | public function setHeaders(array $headers)  | 
                                                        
| 208 | 208 |      { | 
                                                        
| 209 | -        array_walk($headers, function ($v, $k) { | 
                                                        |
| 209 | +        array_walk($headers, function($v, $k) { | 
                                                        |
| 210 | 210 | $this->validateArgument(  | 
                                                        
| 211 | 211 | 'headers',  | 
                                                        
| 212 | 212 | $k,  | 
                                                        
| 213 | - [ static::FILTER_EXCLUDE, static::FILTER_INCLUDE ]  | 
                                                        |
| 213 | + [static::FILTER_EXCLUDE, static::FILTER_INCLUDE]  | 
                                                        |
| 214 | 214 | );  | 
                                                        
| 215 | 215 |              if (!is_array($v)) { | 
                                                        
| 216 | 216 | throw new InvalidArgumentException(  | 
                                                        
@@ -238,7 +238,7 @@ discard block  | 
                                                    ||
| 238 | 238 | $this->validateArgument(  | 
                                                        
| 239 | 239 | $name,  | 
                                                        
| 240 | 240 | $value,  | 
                                                        
| 241 | - [ static::FILTER_OFF, static::FILTER_EXCLUDE, static::FILTER_INCLUDE ]  | 
                                                        |
| 241 | + [static::FILTER_OFF, static::FILTER_EXCLUDE, static::FILTER_INCLUDE]  | 
                                                        |
| 242 | 242 | );  | 
                                                        
| 243 | 243 | $this->$name = $value;  | 
                                                        
| 244 | 244 |          } elseif ($name === 'headers') { | 
                                                        
@@ -49,7 +49,7 @@ discard block  | 
                                                    ||
| 49 | 49 | |
| 50 | 50 | $pbChildren = $partBuilder->getChildren();  | 
                                                        
| 51 | 51 |          if (!empty($pbChildren)) { | 
                                                        
| 52 | -            $this->children = array_map(function ($child) use ($stream) { | 
                                                        |
| 52 | +            $this->children = array_map(function($child) use ($stream) { | 
                                                        |
| 53 | 53 | $childPart = $child->createMessagePart($stream);  | 
                                                        
| 54 | 54 | $childPart->parent = $this;  | 
                                                        
| 55 | 55 | return $childPart;  | 
                                                        
@@ -65,7 +65,7 @@ discard block  | 
                                                    ||
| 65 | 65 | */  | 
                                                        
| 66 | 66 | protected function getAllNonFilteredParts()  | 
                                                        
| 67 | 67 |      { | 
                                                        
| 68 | - $parts = [ $this ];  | 
                                                        |
| 68 | + $parts = [$this];  | 
                                                        |
| 69 | 69 |          foreach ($this->children as $part) { | 
                                                        
| 70 | 70 |              if ($part instanceof MimePart) { | 
                                                        
| 71 | 71 | $parts = array_merge(  | 
                                                        
@@ -116,7 +116,7 @@ discard block  | 
                                                    ||
| 116 | 116 |          if (!empty($filter)) { | 
                                                        
| 117 | 117 | return array_values(array_filter(  | 
                                                        
| 118 | 118 | $parts,  | 
                                                        
| 119 | - [ $filter, 'filter' ]  | 
                                                        |
| 119 | + [$filter, 'filter']  | 
                                                        |
| 120 | 120 | ));  | 
                                                        
| 121 | 121 | }  | 
                                                        
| 122 | 122 | return $parts;  | 
                                                        
@@ -164,7 +164,7 @@ discard block  | 
                                                    ||
| 164 | 164 | public function getChildParts(PartFilter $filter = null)  | 
                                                        
| 165 | 165 |      { | 
                                                        
| 166 | 166 |          if ($filter !== null) { | 
                                                        
| 167 | - return array_values(array_filter($this->children, [ $filter, 'filter' ]));  | 
                                                        |
| 167 | + return array_values(array_filter($this->children, [$filter, 'filter']));  | 
                                                        |
| 168 | 168 | }  | 
                                                        
| 169 | 169 | return $this->children;  | 
                                                        
| 170 | 170 | }  | 
                                                        
@@ -234,7 +234,7 @@ discard block  | 
                                                    ||
| 234 | 234 | $this->children,  | 
                                                        
| 235 | 235 | ($position === null) ? count($this->children) : $position,  | 
                                                        
| 236 | 236 | 0,  | 
                                                        
| 237 | - [ $part ]  | 
                                                        |
| 237 | + [$part]  | 
                                                        |
| 238 | 238 | );  | 
                                                        
| 239 | 239 | $this->onChange();  | 
                                                        
| 240 | 240 | }  | 
                                                        
@@ -88,7 +88,7 @@  | 
                                                    ||
| 88 | 88 | *  | 
                                                        
| 89 | 89 | * @param ParentHeaderPart $part  | 
                                                        
| 90 | 90 | * @return MimePart the newly-created MimePart  | 
                                                        
| 91 | - */  | 
                                                        |
| 91 | + */  | 
                                                        |
| 92 | 92 | public function createNewContentPartFrom(ParentHeaderPart $part)  | 
                                                        
| 93 | 93 |      { | 
                                                        
| 94 | 94 | $mime = $this->partBuilderFactory->newPartBuilder($this->mimePartFactory)->createMessagePart();  | 
                                                        
@@ -88,7 +88,7 @@  | 
                                                    ||
| 88 | 88 |          } else { | 
                                                        
| 89 | 89 | $this->copyHeader($from, $to, 'Content-Transfer-Encoding');  | 
                                                        
| 90 | 90 | }  | 
                                                        
| 91 | - $rem = array_diff(self::$contentHeaders, [ 'Content-Type', 'Content-Transfer-Encoding']);  | 
                                                        |
| 91 | + $rem = array_diff(self::$contentHeaders, ['Content-Type', 'Content-Transfer-Encoding']);  | 
                                                        |
| 92 | 92 |          foreach ($rem as $header) { | 
                                                        
| 93 | 93 | $this->copyHeader($from, $to, $header);  | 
                                                        
| 94 | 94 | }  |