src/Models/Contact.php
public function getPhoneNumber($type)
    {
        if (!in_array($type, [PhoneNumber::WORK, PhoneNumber::HOME, PhoneNumber::FAX, PhoneNumber::MOBILE]))
        {
            throw new InvalidArgumentException($type . " is not a valid phone number type.");
        }

        return $this->phoneNumbers[$type];
    }
public function getPhoneNumber($type)
    {
        if (!in_array($type, [PhoneNumber::WORK, PhoneNumber::HOME, PhoneNumber::FAX, PhoneNumber::MOBILE]))
        {
            throw new InvalidArgumentException($type . " is not a valid phone number type.");
        }

        return $this->phoneNumbers[$type];
    }
public function getPhoneNumber ( $ type ) { if ( ! in_array ( $ type , [ PhoneNumber :: WORK , PhoneNumber :: HOME , PhoneNumber :: FAX , PhoneNumber :: MOBILE ] ) ) { throw new InvalidArgumentException ( $ type . " is not a valid phone number type." ) ; } return $ this -> phoneNumbers [ $ type ] ; }
Get a specific type of phone number
@param $type
@return mixed
Get a specific type of phone number