lib/classes/Swift/Mime/Headers/MailboxHeader.php
protected function normalizeMailboxes(array $mailboxes)
    {
        $actualMailboxes = [];

        foreach ($mailboxes as $key => $value) {
            if (is_string($key)) {
                //key is email addr
                $address = $key;
                $name = $value;
            } else {
                $address = $value;
                $name = null;
            }
            $this->assertValidAddress($address);
            $actualMailboxes[$address] = $name;
        }

        return $actualMailboxes;
    }
protected function normalizeMailboxes(array $mailboxes)
    {
        $actualMailboxes = [];

        foreach ($mailboxes as $key => $value) {
            if (is_string($key)) {
                //key is email addr
                $address = $key;
                $name = $value;
            } else {
                $address = $value;
                $name = null;
            }
            $this->assertValidAddress($address);
            $actualMailboxes[$address] = $name;
        }

        return $actualMailboxes;
    }
protected function normalizeMailboxes ( array $ mailboxes ) { $ actualMailboxes = [ ] ; foreach ( $ mailboxes as $ key => $ value ) { if ( is_string ( $ key ) ) { //key is email addr $ address = $ key ; $ name = $ value ; } else { $ address = $ value ; $ name = null ; } $ this -> assertValidAddress ( $ address ) ; $ actualMailboxes [ $ address ] = $ name ; } return $ actualMailboxes ; }
Normalizes a user-input list of mailboxes into consistent key=>value pairs.

@param string[] $mailboxes

@return string[]
Normalizes a user - input list of mailboxes into consistent key = > value pairs .