@@ -101,7 +101,7 @@ discard block  | 
                                                    ||
| 101 | 101 | array $parts,  | 
                                                        
| 102 | 102 | array &$retParts,  | 
                                                        
| 103 | 103 | $curIndex,  | 
                                                        
| 104 | - HeaderPart &$spacePart,  | 
                                                        |
| 104 | + HeaderPart & $spacePart,  | 
                                                        |
| 105 | 105 | HeaderPart $lastPart  | 
                                                        
| 106 | 106 |      ) { | 
                                                        
| 107 | 107 | $count = count($parts);  | 
                                                        
@@ -127,7 +127,7 @@ discard block  | 
                                                    ||
| 127 | 127 | * @param int $curIndex  | 
                                                        
| 128 | 128 | * @param \ZBateson\MailMimeParser\Header\Part\HeaderPart $spacePart  | 
                                                        
| 129 | 129 | */  | 
                                                        
| 130 | - private function addSpaces(array $parts, array &$retParts, $curIndex, HeaderPart &$spacePart = null)  | 
                                                        |
| 130 | + private function addSpaces(array $parts, array &$retParts, $curIndex, HeaderPart & $spacePart = null)  | 
                                                        |
| 131 | 131 |      { | 
                                                        
| 132 | 132 | $lastPart = end($retParts);  | 
                                                        
| 133 | 133 |          if ($spacePart !== null && $parts[$curIndex]->getValue() !== '' && $lastPart !== false) { | 
                                                        
@@ -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 | }  | 
                                                        
@@ -58,7 +58,7 @@  | 
                                                    ||
| 58 | 58 | * Filters the lines in the passed $lines array, returning a concatenated  | 
                                                        
| 59 | 59 | * string of decoded lines.  | 
                                                        
| 60 | 60 | *  | 
                                                        
| 61 | - * @param array $lines  | 
                                                        |
| 61 | + * @param string[] $lines  | 
                                                        |
| 62 | 62 | * @param int $consumed  | 
                                                        
| 63 | 63 | * @return string  | 
                                                        
| 64 | 64 | */  | 
                                                        
@@ -46,7 +46,7 @@  | 
                                                    ||
| 46 | 46 | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY  | 
                                                        
| 47 | 47 | );  | 
                                                        
| 48 | 48 |          if ($this->leftover !== '') { | 
                                                        
| 49 | - $lines[0] = $this->leftover . $lines[0];  | 
                                                        |
| 49 | + $lines[0] = $this->leftover.$lines[0];  | 
                                                        |
| 50 | 50 | $this->leftover = '';  | 
                                                        
| 51 | 51 | }  | 
                                                        
| 52 | 52 | $last = end($lines);  | 
                                                        
@@ -46,7 +46,7 @@ discard block  | 
                                                    ||
| 46 | 46 | $numBytes = strlen($converted);  | 
                                                        
| 47 | 47 |          if ($this->numBytesWritten != 0) { | 
                                                        
| 48 | 48 | $next = (76 - ($this->numBytesWritten % 76)) % 76;  | 
                                                        
| 49 | - $converted = substr($converted, 0, $next) . "\r\n" . rtrim(chunk_split(substr($converted, $next), 76));  | 
                                                        |
| 49 | + $converted = substr($converted, 0, $next)."\r\n".rtrim(chunk_split(substr($converted, $next), 76));  | 
                                                        |
| 50 | 50 |          } else { | 
                                                        
| 51 | 51 | $converted = rtrim(chunk_split($converted));  | 
                                                        
| 52 | 52 | }  | 
                                                        
@@ -65,7 +65,7 @@ discard block  | 
                                                    ||
| 65 | 65 | private function readAndConvert($in, $out, &$consumed)  | 
                                                        
| 66 | 66 |      { | 
                                                        
| 67 | 67 |          while ($bucket = stream_bucket_make_writeable($in)) { | 
                                                        
| 68 | - $data = $this->leftovers->value . $bucket->data;  | 
                                                        |
| 68 | + $data = $this->leftovers->value.$bucket->data;  | 
                                                        |
| 69 | 69 | $consumed += $bucket->datalen;  | 
                                                        
| 70 | 70 | $nRemain = strlen($data) % 3;  | 
                                                        
| 71 | 71 | $toConvert = $data;  | 
                                                        
@@ -47,7 +47,7 @@  | 
                                                    ||
| 47 | 47 |      { | 
                                                        
| 48 | 48 |          $raw = preg_replace('/\s+/', '', $bucket->data); | 
                                                        
| 49 | 49 |          if ($this->leftover !== '') { | 
                                                        
| 50 | - $raw = $this->leftover . $raw;  | 
                                                        |
| 50 | + $raw = $this->leftover.$raw;  | 
                                                        |
| 51 | 51 | $this->leftover = '';  | 
                                                        
| 52 | 52 | }  | 
                                                        
| 53 | 53 | $nLeftover = strlen($raw) % 4;  | 
                                                        
@@ -39,11 +39,11 @@ discard block  | 
                                                    ||
| 39 | 39 | private function convertAndAppend($data, $out)  | 
                                                        
| 40 | 40 |      { | 
                                                        
| 41 | 41 |          $converted = preg_replace('/\r\n|\r|\n/', "\r\n", convert_uuencode($data)); | 
                                                        
| 42 | - $cleaned = rtrim(substr(rtrim($converted), 0, -1)); // remove end line ` character  | 
                                                        |
| 42 | + $cleaned = rtrim(substr(rtrim($converted), 0, -1)); // remove end line ` character  | 
                                                        |
| 43 | 43 |          if ($cleaned === '') { | 
                                                        
| 44 | 44 | return;  | 
                                                        
| 45 | 45 | }  | 
                                                        
| 46 | - $cleaned = "\r\n" . $cleaned;  | 
                                                        |
| 46 | + $cleaned = "\r\n".$cleaned;  | 
                                                        |
| 47 | 47 | stream_bucket_append($out, stream_bucket_new($this->stream, $cleaned));  | 
                                                        
| 48 | 48 | }  | 
                                                        
| 49 | 49 | |
@@ -85,7 +85,7 @@ discard block  | 
                                                    ||
| 85 | 85 | private function readAndConvert($in, $out, &$consumed)  | 
                                                        
| 86 | 86 |      { | 
                                                        
| 87 | 87 |          while ($bucket = stream_bucket_make_writeable($in)) { | 
                                                        
| 88 | - $data = $this->leftovers->value . $bucket->data;  | 
                                                        |
| 88 | + $data = $this->leftovers->value.$bucket->data;  | 
                                                        |
| 89 | 89 |              if (!$this->headerWritten) { | 
                                                        
| 90 | 90 | $this->writeUUEncodingHeader($out);  | 
                                                        
| 91 | 91 | $this->headerWritten = true;  | 
                                                        
@@ -98,7 +98,7 @@ discard block  | 
                                                    ||
| 98 | 98 | $this->leftovers->encodedValue = $this->getUUEncodingFooter();  | 
                                                        
| 99 | 99 |              } else { | 
                                                        
| 100 | 100 | $this->leftovers->value = substr($data, -$nRemain);  | 
                                                        
| 101 | - $this->leftovers->encodedValue = "\r\n" .  | 
                                                        |
| 101 | + $this->leftovers->encodedValue = "\r\n".  | 
                                                        |
| 102 | 102 | rtrim(substr(rtrim(convert_uuencode($this->leftovers->value)), 0, -1))  | 
                                                        
| 103 | 103 | . $this->getUUEncodingFooter();  | 
                                                        
| 104 | 104 | $toConvert = substr($data, 0, -$nRemain);  | 
                                                        
@@ -50,11 +50,11 @@  | 
                                                    ||
| 50 | 50 | |
| 51 | 51 | $this->setRawHeader(  | 
                                                        
| 52 | 52 | 'Content-Type',  | 
                                                        
| 53 | - 'application/octet-stream; name="' . addcslashes($filename, '"') . '"'  | 
                                                        |
| 53 | + 'application/octet-stream; name="'.addcslashes($filename, '"').'"'  | 
                                                        |
| 54 | 54 | );  | 
                                                        
| 55 | 55 | $this->setRawHeader(  | 
                                                        
| 56 | 56 | 'Content-Disposition',  | 
                                                        
| 57 | - 'attachment; filename="' . addcslashes($filename, '"') . '"'  | 
                                                        |
| 57 | + 'attachment; filename="'.addcslashes($filename, '"').'"'  | 
                                                        |
| 58 | 58 | );  | 
                                                        
| 59 | 59 |          $this->setRawHeader('Content-Transfer-Encoding', 'x-uuencode'); | 
                                                        
| 60 | 60 | }  | 
                                                        
@@ -96,7 +96,7 @@ discard block  | 
                                                    ||
| 96 | 96 | $this->addRawHeaderToPart($header, $part);  | 
                                                        
| 97 | 97 | $header = '';  | 
                                                        
| 98 | 98 |              } else { | 
                                                        
| 99 | - $line = "\r\n" . $line;  | 
                                                        |
| 99 | + $line = "\r\n".$line;  | 
                                                        |
| 100 | 100 | }  | 
                                                        
| 101 | 101 | $header .= rtrim($line, "\r\n");  | 
                                                        
| 102 | 102 | } while ($header !== '');  | 
                                                        
@@ -177,8 +177,7 @@ discard block  | 
                                                    ||
| 177 | 177 | private function getParentBoundary($curBoundary, MimePart $parent = null)  | 
                                                        
| 178 | 178 |      { | 
                                                        
| 179 | 179 | return $parent !== null ?  | 
                                                        
| 180 | -            $parent->getHeaderParameter('Content-Type', 'boundary') : | 
                                                        |
| 181 | - $curBoundary;  | 
                                                        |
| 180 | +            $parent->getHeaderParameter('Content-Type', 'boundary') : $curBoundary; | 
                                                        |
| 182 | 181 | }  | 
                                                        
| 183 | 182 | |
| 184 | 183 | /**  | 
                                                        
@@ -143,11 +143,11 @@  | 
                                                    ||
| 143 | 143 | /**  | 
                                                        
| 144 | 144 | *  | 
                                                        
| 145 | 145 | *  | 
                                                        
| 146 | - * @param type $handle  | 
                                                        |
| 146 | + * @param resource $handle  | 
                                                        |
| 147 | 147 | * @param MimePart $part  | 
                                                        
| 148 | 148 | * @param Message $message  | 
                                                        
| 149 | - * @param type $contentStartPos  | 
                                                        |
| 150 | - * @param type $boundaryLength  | 
                                                        |
| 149 | + * @param integer $contentStartPos  | 
                                                        |
| 150 | + * @param integer $boundaryLength  | 
                                                        |
| 151 | 151 | */  | 
                                                        
| 152 | 152 | protected function attachStreamHandles($handle, MimePart $part, Message $message, $contentStartPos, $boundaryLength)  | 
                                                        
| 153 | 153 |      { | 
                                                        
@@ -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 | }  |