Skip to content

Commit c3e6279

Browse files
authored
fix: allow id to be string and null (#68)
Co-authored-by: Dustin Carlson <[email protected]>
1 parent 20e90cf commit c3e6279

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Data/Requests/RequestData.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @property string $method The name of the method to be invoked.
1212
* @property string $jsonRpc The JSON-RPC version string (e.g., "2.0").
13-
* @property int $id An identifier established by the Client.
13+
* @property int|string|null $id An identifier established by the Client.
1414
* @property array<string, mixed> $params The parameters to be used during the invocation of the method.
1515
*/
1616
class RequestData
@@ -22,7 +22,7 @@ class RequestData
2222
public string $jsonRpc;
2323

2424
/** @var int An identifier established by the Client. */
25-
public int $id;
25+
public int|string|null $id;
2626

2727
/** @var array<string, mixed> The parameters for the method invocation. */
2828
public array $params;
@@ -35,7 +35,7 @@ class RequestData
3535
* @param int $id The request identifier.
3636
* @param array<string, mixed> $params The request parameters.
3737
*/
38-
public function __construct(string $method, string $jsonRpc, int $id, array $params)
38+
public function __construct(string $method, string $jsonRpc, int|string|null $id, array $params)
3939
{
4040
$this->method = $method;
4141
$this->jsonRpc = $jsonRpc;

0 commit comments

Comments
 (0)