255 || mb_strlen($url) > 2000 || filter_var($url, FILTER_VALIDATE_URL) === false || ! in_array(strtolower((string) parse_url($url, PHP_URL_SCHEME)), ['http', 'https'], true)) { throw new InvalidJobLink; } $this->title = $title; $this->url = $url; } }