chore: Аннотации к типам
This commit is contained in:
parent
5e8958969f
commit
f964472e62
28 changed files with 140 additions and 36 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ class HttpResponse
|
|||
/** @var string */
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* @param string $response HTTP ответ
|
||||
*/
|
||||
public function __construct($response)
|
||||
{
|
||||
$this->offset = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue