private function flattenEmailAddresses($emailAddressesByField) {
        $flattened = [];
        foreach ($emailAddressesByField as $field => $emailAddresses) {
            foreach ($emailAddresses as $emailAddress) {
                $flattened[] = $emailAddress;
            }
        }

        return array_unique($flattened);
    }
private function flattenEmailAddresses($emailAddressesByField) {
        $flattened = [];
        foreach ($emailAddressesByField as $field => $emailAddresses) {
            foreach ($emailAddresses as $emailAddress) {
                $flattened[] = $emailAddress;
            }
        }

        return array_unique($flattened);
    }
private function flattenEmailAddresses ( $ emailAddressesByField ) { $ flattened = [ ] ; foreach ( $ emailAddressesByField as $ field => $ emailAddresses ) { foreach ( $ emailAddresses as $ emailAddress ) { $ flattened [ ] = $ emailAddress ; } } return array_unique ( $ flattened ) ; }
Takes the hash of email address and the field they were found in and
returns a flattened array of those email addresses.

@param $emailAddressesByField

@return array
Takes the hash of email address and the field they were found in and returns a flattened array of those email addresses .