Skip to content

Commit

Permalink
Fix tests, fix psalm (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz authored Apr 13, 2023
1 parent 44b6f61 commit fca0221
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private function createIndex(Response $response): array
}

/**
* @param non-empty-string $method
* @psalm-suppress MixedReturnStatement
* @psalm-suppress MixedInferredReturnType
*
Expand Down
9 changes: 3 additions & 6 deletions tests/Stub/RPCConnectionStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

class RPCConnectionStub implements RPCInterface
{
/**
* @var CodecInterface
*/
private CodecInterface $codec;

/**
Expand Down Expand Up @@ -44,11 +41,11 @@ public function withCodec(CodecInterface $codec): RPCInterface
}

/**
* {@inheritDoc}
* @param non-empty-string $method
*/
public function call(string $method, $payload, $options = null)
public function call(string $method, mixed $payload, mixed $options = null): mixed
{
$result = $this->mapping[$method] ?? function () use ($method) {
$result = $this->mapping[$method] ?? static function () use ($method) {
throw new ServiceException('RPC: can\'t find method ' . $method);
};

Expand Down

0 comments on commit fca0221

Please sign in to comment.