Skip to content

Commit

Permalink
Fix UnSubAck missing setCodes/getCodes methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Aug 2, 2021
1 parent 541311f commit 61d5e09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Message/SubAck.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public function getCodes(): array
return $this->codes;
}

public function setCodes(array $code): self
public function setCodes(array $codes): self
{
$this->codes = $code;
$this->codes = $codes;

return $this;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Message/UnSubAck.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public function setMessageId(int $messageId): self
return $this;
}

public function getCode(): int
public function getCodes(): array
{
return $this->code;
return $this->codes;
}

public function setCode(int $code): self
public function setCodes(array $codes): self
{
$this->code = $code;
$this->codes = $codes;

return $this;
}
Expand All @@ -56,7 +56,7 @@ public function getContents(bool $getArray = false)
];

if ($this->isMQTT5()) {
$buffer['code'] = $this->getCode();
$buffer['codes'] = $this->getCodes();
$buffer['properties'] = $this->getProperties();
}

Expand Down

0 comments on commit 61d5e09

Please sign in to comment.