Skip to content

Commit

Permalink
Add type-hint for grpc payload header
Browse files Browse the repository at this point in the history
  • Loading branch information
rauanmayemir committed Sep 10, 2024
1 parent 3467c13 commit 492e85f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Internal/CallContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ public function __construct(
*/
public static function decode(string $payload): self
{
/**
* @psalm-var array{
* service: class-string<ServiceInterface>,
* method: non-empty-string,
* context: array<string, array<string>>
* } $data
*/
$data = Json::decode($payload);

return new self(
Expand Down

0 comments on commit 492e85f

Please sign in to comment.