src/Header/Consumer/CommentConsumer.php
protected function processParts(array $parts)
    {
        $comment = '';
        foreach ($parts as $part) {
            // order is important here - CommentPart extends LiteralPart
            if ($part instanceof CommentPart) {
                $comment .= '(' . $part->getComment() . ')';
            } elseif ($part instanceof LiteralPart) {
                $comment .= '"' . $part->getValue() . '"';
            } else {
                $comment .= $part->getValue();
            }
        }
        return [$this->partFactory->newCommentPart($comment)];
    }
protected function processParts(array $parts)
    {
        $comment = '';
        foreach ($parts as $part) {
            // order is important here - CommentPart extends LiteralPart
            if ($part instanceof CommentPart) {
                $comment .= '(' . $part->getComment() . ')';
            } elseif ($part instanceof LiteralPart) {
                $comment .= '"' . $part->getValue() . '"';
            } else {
                $comment .= $part->getValue();
            }
        }
        return [$this->partFactory->newCommentPart($comment)];
    }
protected function processParts ( array $ parts ) { $ comment = '' ; foreach ( $ parts as $ part ) { // order is important here - CommentPart extends LiteralPart if ( $ part instanceof CommentPart ) { $ comment .= '(' . $ part -> getComment ( ) . ')' ; } elseif ( $ part instanceof LiteralPart ) { $ comment .= '"' . $ part -> getValue ( ) . '"' ; } else { $ comment .= $ part -> getValue ( ) ; } } return [ $ this -> partFactory -> newCommentPart ( $ comment ) ] ; }
Post processing involves creating a single Part\CommentPart out of
generated parts from tokens.  The Part\CommentPart is returned in an
array.

@param \ZBateson\MailMimeParser\Header\Part\HeaderPart[] $parts
@return \ZBateson\MailMimeParser\Header\Part\HeaderPart[]|array
Post processing involves creating a single Part \ CommentPart out of generated parts from tokens . The Part \ CommentPart is returned in an array .