private function addSpaces(array $parts, array &$retParts, $curIndex, HeaderPart &$spacePart = null)
    {
        $lastPart = end($retParts);
        if ($spacePart !== null && $curIndex < count($parts) && $parts[$curIndex]->getValue() !== '' && $lastPart !== false) {
            $this->addSpaceToRetParts($parts, $retParts, $curIndex, $spacePart, $lastPart);
        }
    }
private function addSpaces(array $parts, array &$retParts, $curIndex, HeaderPart &$spacePart = null)
    {
        $lastPart = end($retParts);
        if ($spacePart !== null && $curIndex < count($parts) && $parts[$curIndex]->getValue() !== '' && $lastPart !== false) {
            $this->addSpaceToRetParts($parts, $retParts, $curIndex, $spacePart, $lastPart);
        }
    }
private function addSpaces ( array $ parts , array & $ retParts , $ curIndex , HeaderPart & $ spacePart = null ) { $ lastPart = end ( $ retParts ) ; if ( $ spacePart !== null && $ curIndex < count ( $ parts ) && $ parts [ $ curIndex ] -> getValue ( ) !== '' && $ lastPart !== false ) { $ this -> addSpaceToRetParts ( $ parts , $ retParts , $ curIndex , $ spacePart , $ lastPart ) ; } }
Checks if the passed space part should be added to the returned parts and
adds it.

Never adds a space if it's the first part, otherwise only add it if
either part isn't set to ignore the space

@param \ZBateson\MailMimeParser\Header\Part\HeaderPart[] $parts
@param \ZBateson\MailMimeParser\Header\Part\HeaderPart[] $retParts
@param int $curIndex
@param \ZBateson\MailMimeParser\Header\Part\HeaderPart $spacePart
Checks if the passed space part should be added to the returned parts and adds it .