Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 2f198eb

Browse files
committed
make sure we can convert Request and Notification to string
This is already used when we are logging
1 parent fe06847 commit 2f198eb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Message/Notification.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@ public function jsonSerialize(): array
3737
'params' => $this->params,
3838
];
3939
}
40+
41+
public function __toString(): string
42+
{
43+
return sprintf('%s', $this->method);
44+
}
4045
}

src/Message/Request.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,9 @@ public function jsonSerialize(): array
4040
'params' => $this->params,
4141
];
4242
}
43+
44+
public function __toString(): string
45+
{
46+
return sprintf('%s: %s', $this->id, $this->method);
47+
}
4348
}

0 commit comments

Comments
 (0)