[Server] Refactor protocol pipeline to separate request and notification handling (#106)

This commit is contained in:
Kyrian Obikwelu 2025-10-12 13:53:41 +01:00 • committed by GitHub
commit 54a5d1495c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,9 @@ class Response implements MessageInterface
if (!isset($data['result'])) {
throw new InvalidArgumentException('Response must contain "result" field.');
}
if (!\is_array($data['result'])) {
throw new InvalidArgumentException('Response "result" must be an array.');
}
return new self($data['id'], $data['result']);
}