mirror of
https://github.com/YGGverse/gemini-php.git
synced 2026-03-31 17:05:29 +00:00
allow nullable response init
This commit is contained in:
parent
d7d6083634
commit
c38cdc841f
1 changed files with 30 additions and 27 deletions
|
|
@ -10,7 +10,9 @@ class Response
|
|||
private ?string $_meta = null;
|
||||
private ?string $_body = null;
|
||||
|
||||
public function __construct(string $data)
|
||||
public function __construct(?string $data = null)
|
||||
{
|
||||
if ($data)
|
||||
{
|
||||
$match = [];
|
||||
|
||||
|
|
@ -46,6 +48,7 @@ class Response
|
|||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setCode(?int $value): void
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue