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');
    }
  }