public function format($format)
    {
        $parsedFormat = static::parseFormat($format);

        if (is_null($parsedFormat)) {
            throw NumberFormatException::invalid($format);
        }

        return $this->lib->format(
            $this->getPhoneNumberInstance(),
            $parsedFormat
        );
    }
public function format($format)
    {
        $parsedFormat = static::parseFormat($format);

        if (is_null($parsedFormat)) {
            throw NumberFormatException::invalid($format);
        }

        return $this->lib->format(
            $this->getPhoneNumberInstance(),
            $parsedFormat
        );
    }
public function format ( $ format ) { $ parsedFormat = static :: parseFormat ( $ format ) ; if ( is_null ( $ parsedFormat ) ) { throw NumberFormatException :: invalid ( $ format ) ; } return $ this -> lib -> format ( $ this -> getPhoneNumberInstance ( ) , $ parsedFormat ) ; }
Format the phone number in a given format.

@param string $format
@return string
@throws \Propaganistas\LaravelPhone\Exceptions\NumberFormatException
Format the phone number in a given format .