src/EmailReplyParser/Parser/EmailParser.php
protected function createEmail(array $fragmentDTOs)
    {
        $fragments = array();
        foreach ($fragmentDTOs as $fragment) {
            $fragments[] = new Fragment(
                preg_replace("/^\n/", '', implode("\n", $fragment->lines)),
                $fragment->isHidden,
                $fragment->isSignature,
                $fragment->isQuoted
            );
        }

        return new Email($fragments);
    }
protected function createEmail(array $fragmentDTOs)
    {
        $fragments = array();
        foreach ($fragmentDTOs as $fragment) {
            $fragments[] = new Fragment(
                preg_replace("/^\n/", '', implode("\n", $fragment->lines)),
                $fragment->isHidden,
                $fragment->isSignature,
                $fragment->isQuoted
            );
        }

        return new Email($fragments);
    }
@param FragmentDTO[] $fragmentDTOs

@return Email