src/Url.php
private function validate(string $url): void {
    if(filter_var($url, FILTER_VALIDATE_URL) === false) {
      throw new InvalidArgumentException('Expected URL, but got [' . var_export($url, true) . '] instead');
    }
  }
private function validate(string $url): void {
    if(filter_var($url, FILTER_VALIDATE_URL) === false) {
      throw new InvalidArgumentException('Expected URL, but got [' . var_export($url, true) . '] instead');
    }
  }
Ensures the URL passed in is valid

@throws  InvalidArgumentException  If the value is not a valid URL

@param  string  $url  The value to validate

@return  void