protected function processParts(array $parts)
    {
        $emails = [];
        foreach ($parts as $part) {
            if ($part instanceof AddressGroupPart) {
                $emails = array_merge($emails, $part->getAddresses());
                continue;
            }
            $emails[] = $part;
        }
        $group = $this->partFactory->newAddressGroupPart($emails);
        return [$group];
    }
protected function processParts(array $parts)
    {
        $emails = [];
        foreach ($parts as $part) {
            if ($part instanceof AddressGroupPart) {
                $emails = array_merge($emails, $part->getAddresses());
                continue;
            }
            $emails[] = $part;
        }
        $group = $this->partFactory->newAddressGroupPart($emails);
        return [$group];
    }
protected function processParts ( array $ parts ) { $ emails = [ ] ; foreach ( $ parts as $ part ) { if ( $ part instanceof AddressGroupPart ) { $ emails = array_merge ( $ emails , $ part -> getAddresses ( ) ) ; continue ; } $ emails [ ] = $ part ; } $ group = $ this -> partFactory -> newAddressGroupPart ( $ emails ) ; return [ $ group ] ; }
Performs post-processing on parsed parts.

AddressGroupConsumer returns an array with a single Part\AddressGroupPart
element with all email addresses from this and any sub-groups.

@param \ZBateson\MailMimeParser\Header\Part\HeaderPart[] $parts
@return AddressGroupPart[]|array
Performs post - processing on parsed parts .