/** * Sets the string representation of the distance value. * * @param string $text The distance as text. * * @throws \Ivory\GoogleMap\Exception\ServiceException If the text is not valid. */ public function setText($text) { if (!is_string($text)) { throw ServiceException::invalidDistanceText(); } $this->text = $text; }