Skip to content

Commit e4c1d81

Browse files
Fix ConsumeMessage $value type (#23)
1 parent 1e5088d commit e4c1d81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Consumer/ConsumeMessage.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ConsumeMessage
2727
protected $key;
2828

2929
/**
30-
* @var string
30+
* @var null|string
3131
*/
3232
protected $value;
3333

@@ -36,7 +36,7 @@ class ConsumeMessage
3636
*/
3737
protected $headers;
3838

39-
public function __construct(Consumer $consumer, string $topic, int $partition, ?string $key, string $value, array $headers)
39+
public function __construct(Consumer $consumer, string $topic, int $partition, ?string $key, ?string $value, array $headers)
4040
{
4141
$this->consumer = $consumer;
4242
$this->topic = $topic;
@@ -94,12 +94,12 @@ public function setKey(?string $key): self
9494
return $this;
9595
}
9696

97-
public function getValue(): string
97+
public function getValue(): ?string
9898
{
9999
return $this->value;
100100
}
101101

102-
public function setValue(string $value): self
102+
public function setValue(?string $value): self
103103
{
104104
$this->value = $value;
105105

0 commit comments

Comments
 (0)