src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
private function getAddresses($entity)
    {
        if ($entity instanceof AccountInterface) {
            return $entity->getAccountAddresses();
        } elseif ($entity instanceof Contact) {
            return $entity->getContactAddresses();
        }

        return;
    }
private function getAddresses($entity)
    {
        if ($entity instanceof AccountInterface) {
            return $entity->getAccountAddresses();
        } elseif ($entity instanceof Contact) {
            return $entity->getContactAddresses();
        }

        return;
    }
private function getAddresses ( $ entity ) { if ( $ entity instanceof AccountInterface ) { return $ entity -> getAccountAddresses ( ) ; } elseif ( $ entity instanceof Contact ) { return $ entity -> getContactAddresses ( ) ; } return ; }
returns addresses from account or contact.

@param AccountInterface|Contact $entity

@return \Doctrine\Common\Collections\Collection|null
returns addresses from account or contact .