chore: Проверки к типам
This commit is contained in:
parent
5d3fae4249
commit
8786e84568
12 changed files with 41 additions and 47 deletions
|
|
@ -73,7 +73,11 @@ class HttpRequest
|
|||
public function setUrl($url): void
|
||||
{
|
||||
$this->url = $url;
|
||||
$this->host = parse_url($this->url, PHP_URL_HOST);
|
||||
$host = parse_url($this->url, PHP_URL_HOST);
|
||||
if (!$host) {
|
||||
throw new \RuntimeException("Не удалось получить хост");
|
||||
}
|
||||
$this->host = $host;
|
||||
}
|
||||
|
||||
public function getUrl(): string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue