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

This commit is contained in:
origami11@yandex.ru 2025-10-23 15:54:14 +03:00
parent 530a3b931d
commit 730a608f9b
27 changed files with 491 additions and 134 deletions

View file

@ -8,7 +8,7 @@ namespace ctiso\Connection;
class HttpResponse
{
private $offset;
private $param = array ();
private $param = [];
private $code;
public $response;
public $version;
@ -19,7 +19,7 @@ class HttpResponse
$this->offset = 0;
$this->response = $response;
$this->parseMessage();
}
}
/**
* Обработка HTTP ответа
@ -30,7 +30,7 @@ class HttpResponse
$this->version = $http[0];
$this->code = $http[1];
$line = $this->getLine();
$line = $this->getLine();
while ($offset = strpos($line, ":")) {
$this->param[substr($line, 0, $offset)] = trim(substr($line, $offset + 1));
$line = $this->getLine();
@ -59,7 +59,7 @@ class HttpResponse
{
$begin = $this->offset;
$offset = strpos($this->response, "\r\n", $this->offset);
$result = substr($this->response, $begin, $offset - $begin);
$result = substr($this->response, $begin, $offset - $begin);
$this->offset = $offset + 2;
return $result;
}
@ -67,20 +67,20 @@ class HttpResponse
/**
* Значение параметра HTTP ответа
*/
public function getParameter($name)
public function getParameter($name)
{
return $this->param[$name];
}
public function getData()
public function getData()
{
return $this->data;
}
/**
* Состояние
* Состояние
*/
public function getCode()
public function getCode()
{
return $this->code;
}