First unit tests, misc fixes
This commit is contained in:
@ -23,11 +23,11 @@ class Message
|
||||
|
||||
public function __construct(
|
||||
array $topic,
|
||||
?string $type,
|
||||
?string $data,
|
||||
?bool $private,
|
||||
?string $id,
|
||||
?int $retry
|
||||
?string $data=null,
|
||||
?string $type=null,
|
||||
?bool $private=null,
|
||||
?string $id=null,
|
||||
?int $retry=null
|
||||
)
|
||||
{
|
||||
$this->topic = $topic;
|
||||
@ -60,7 +60,7 @@ class Message
|
||||
topic: (array)$data['topic'],
|
||||
type: $data['type']??null,
|
||||
data: $data['data']??null,
|
||||
private: match ($data['private']??null) { "on" => true, null => null, default => false },
|
||||
private: match ($data['private']??null) { "on" => true, true => true, null => null, default => false },
|
||||
id: $data['id']??null,
|
||||
retry: $data['retry']??null,
|
||||
);
|
||||
|
@ -7,4 +7,6 @@ interface SubscriberInterface
|
||||
public function deliver(Message $message): void;
|
||||
|
||||
public function isAuthorized(): bool;
|
||||
|
||||
public function getPayload(): ?array;
|
||||
}
|
Reference in New Issue
Block a user