File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace PhpLlm \McpSdk \Message ;
6
6
7
- final readonly class Notification implements \JsonSerializable
7
+ final readonly class Notification implements \JsonSerializable, \Stringable
8
8
{
9
9
/**
10
10
* @param array<string, mixed>|null $params
@@ -37,4 +37,9 @@ public function jsonSerialize(): array
37
37
'params ' => $ this ->params ,
38
38
];
39
39
}
40
+
41
+ public function __toString (): string
42
+ {
43
+ return sprintf ('%s ' , $ this ->method );
44
+ }
40
45
}
Original file line number Diff line number Diff line change 4
4
5
5
namespace PhpLlm \McpSdk \Message ;
6
6
7
- final class Request implements \JsonSerializable
7
+ final class Request implements \JsonSerializable, \Stringable
8
8
{
9
9
/**
10
10
* @param array<string, mixed>|null $params
@@ -40,4 +40,9 @@ public function jsonSerialize(): array
40
40
'params ' => $ this ->params ,
41
41
];
42
42
}
43
+
44
+ public function __toString (): string
45
+ {
46
+ return sprintf ('%s: %s ' , $ this ->id , $ this ->method );
47
+ }
43
48
}
You can’t perform that action at this time.
0 commit comments