Skip to content

Commit

Permalink
Fix Psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Jun 26, 2024
1 parent c799049 commit 526fb9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/RPC/RPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function __construct(RelayInterface $relay, CodecInterface $codec = null)
{
$this->relay = $relay;
$this->codec = $codec ?? new JsonCodec();
/** @psalm-suppress DeprecatedProperty */
$this->hasSequence = \method_exists($this->relay, 'getNextSequence');
}

Expand Down Expand Up @@ -83,6 +84,7 @@ public function withCodec(CodecInterface $codec): RPCInterface
*/
public function call(string $method, $payload, $options = null)
{
/** @psalm-suppress DeprecatedMethod */
$seq = $this->getNextSequence();

$this->relay->send($this->packFrame($method, $payload, $seq));
Expand Down Expand Up @@ -187,6 +189,7 @@ private function packFrame(string $method, $payload, int $seq): Frame
*/
private function getNextSequence(): int
{
/** @psalm-suppress DeprecatedProperty */
return $this->hasSequence ? $this->relay->getNextSequence() : self::$seq;
}
}

0 comments on commit 526fb9a

Please sign in to comment.