chore: Аннотации к типам

This commit is contained in:
origami11@yandex.ru 2025-10-30 12:59:36 +03:00
parent 5e8958969f
commit f964472e62
28 changed files with 140 additions and 36 deletions

View file

@ -52,7 +52,7 @@ class HttpRequest
* @param string $name
* @param string $value
*/
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
$this->param[$name] = $value;
}
@ -93,6 +93,7 @@ class HttpRequest
/**
* Посылает запрос и возвращает страницу
* @return string|null
*/
public function getPage()
{
@ -105,7 +106,7 @@ class HttpRequest
$header = $this->getHeader();
fwrite($socket, $header);
$result = null;
$result = '';
while (! feof($socket)) {
$result .= fgets($socket, 128);
}

View file

@ -20,6 +20,9 @@ class HttpResponse
/** @var string */
public $data;
/**
* @param string $response HTTP ответ
*/
public function __construct($response)
{
$this->offset = 0;