protected function filterIgnoredSpaces(array $parts)
    {
        $partsFiltered = array_values(array_filter($parts));
        $retParts = [];
        $spacePart = null;
        $count = count($partsFiltered);
        for ($i = 0; $i < $count; ++$i) {
            $part = $partsFiltered[$i];
            if ($this->isSpaceToken($part)) {
                $spacePart = $part;
                continue;
            }
            $this->addSpaces($partsFiltered, $retParts, $i, $spacePart);
            $retParts[] = $part;
        }
        // ignore trailing spaces
        return $retParts;
    }
protected function filterIgnoredSpaces(array $parts)
    {
        $partsFiltered = array_values(array_filter($parts));
        $retParts = [];
        $spacePart = null;
        $count = count($partsFiltered);
        for ($i = 0; $i < $count; ++$i) {
            $part = $partsFiltered[$i];
            if ($this->isSpaceToken($part)) {
                $spacePart = $part;
                continue;
            }
            $this->addSpaces($partsFiltered, $retParts, $i, $spacePart);
            $retParts[] = $part;
        }
        // ignore trailing spaces
        return $retParts;
    }
protected function filterIgnoredSpaces ( array $ parts ) { $ partsFiltered = array_values ( array_filter ( $ parts ) ) ; $ retParts = [ ] ; $ spacePart = null ; $ count = count ( $ partsFiltered ) ; for ( $ i = 0 ; $ i < $ count ; ++ $ i ) { $ part = $ partsFiltered [ $ i ] ; if ( $ this -> isSpaceToken ( $ part ) ) { $ spacePart = $ part ; continue ; } $ this -> addSpaces ( $ partsFiltered , $ retParts , $ i , $ spacePart ) ; $ retParts [ ] = $ part ; } // ignore trailing spaces return $ retParts ; }
Filters out ignorable spaces between parts in the passed array.

Spaces with parts on either side of it that specify they can be ignored
are filtered out.  filterIgnoredSpaces is called from within
processParts, and if needed by an implementing class that overrides
processParts, must be specifically called.

@param \ZBateson\MailMimeParser\Header\Part\HeaderPart[] $parts
@return \ZBateson\MailMimeParser\Header\Part\HeaderPart[]
Filters out ignorable spaces between parts in the passed array .