src/Models/PhoneNumber.php
public function setType($type)
    {
        if (!in_array($type,[$this::WORK, $this::HOME, $this::MOBILE, $this::FAX]))
        {
            throw new InvalidArgumentException("Type is not a valid type. You must use one of the constants in the PhoneNumber class as the type.");
        }
        $this->type = $type;
    }
public function setType($type)
    {
        if (!in_array($type,[$this::WORK, $this::HOME, $this::MOBILE, $this::FAX]))
        {
            throw new InvalidArgumentException("Type is not a valid type. You must use one of the constants in the PhoneNumber class as the type.");
        }
        $this->type = $type;
    }
public function setType ( $ type ) { if ( ! in_array ( $ type , [ $ this :: WORK , $ this :: HOME , $ this :: MOBILE , $ this :: FAX ] ) ) { throw new InvalidArgumentException ( "Type is not a valid type. You must use one of the constants in the PhoneNumber class as the type." ) ; } $ this -> type = $ type ; }
Set the type.
@param $type
@return mixed
Set the type .