This repository was archived by the owner on Jul 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 13 files changed +27
-27
lines changed Expand file tree Collapse file tree 13 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 55use PhpLlm \McpSdk \Capability \PromptChain ;
66use PhpLlm \McpSdk \Capability \ResourceChain ;
77use PhpLlm \McpSdk \Capability \ToolChain ;
8- use PhpLlm \McpSdk \Server \NotificationHandler ;
8+ use PhpLlm \McpSdk \Server \NotificationHandlerInterface ;
99use PhpLlm \McpSdk \Server \NotificationHandler \InitializedHandler ;
10- use PhpLlm \McpSdk \Server \RequestHandler ;
10+ use PhpLlm \McpSdk \Server \RequestHandlerInterface ;
1111use PhpLlm \McpSdk \Server \RequestHandler \InitializeHandler ;
1212use PhpLlm \McpSdk \Server \RequestHandler \PingHandler ;
1313use PhpLlm \McpSdk \Server \RequestHandler \PromptGetHandler ;
2020class Builder
2121{
2222 /**
23- * @return list<RequestHandler >
23+ * @return list<RequestHandlerInterface >
2424 */
2525 public static function buildRequestHandlers (): array
2626 {
@@ -49,7 +49,7 @@ public static function buildRequestHandlers(): array
4949 }
5050
5151 /**
52- * @return list<NotificationHandler >
52+ * @return list<NotificationHandlerInterface >
5353 */
5454 public static function buildNotificationHandlers (): array
5555 {
Original file line number Diff line number Diff line change 55namespace PhpLlm \McpSdk ;
66
77use PhpLlm \McpSdk \Server \JsonRpcHandler ;
8- use PhpLlm \McpSdk \Server \Transport ;
8+ use PhpLlm \McpSdk \Server \TransportInterface ;
99use Psr \Log \LoggerInterface ;
1010use Psr \Log \NullLogger ;
1111
@@ -17,7 +17,7 @@ public function __construct(
1717 ) {
1818 }
1919
20- public function connect (Transport $ transport ): void
20+ public function connect (TransportInterface $ transport ): void
2121 {
2222 $ transport ->initialize ();
2323 $ this ->logger ->info ('Transport initialized ' );
Original file line number Diff line number Diff line change 1717readonly class JsonRpcHandler
1818{
1919 /**
20- * @var array<int, RequestHandler >
20+ * @var array<int, RequestHandlerInterface >
2121 */
2222 private array $ requestHandlers ;
2323
2424 /**
25- * @var array<int, NotificationHandler >
25+ * @var array<int, NotificationHandlerInterface >
2626 */
2727 private array $ notificationHandlers ;
2828
2929 /**
30- * @param iterable<RequestHandler > $requestHandlers
31- * @param iterable<NotificationHandler > $notificationHandlers
30+ * @param iterable<RequestHandlerInterface > $requestHandlers
31+ * @param iterable<NotificationHandlerInterface > $notificationHandlers
3232 */
3333 public function __construct (
3434 private Factory $ messageFactory ,
Original file line number Diff line number Diff line change 55namespace PhpLlm \McpSdk \Server \NotificationHandler ;
66
77use PhpLlm \McpSdk \Message \Notification ;
8- use PhpLlm \McpSdk \Server \NotificationHandler ;
8+ use PhpLlm \McpSdk \Server \NotificationHandlerInterface ;
99
10- abstract class BaseNotificationHandler implements NotificationHandler
10+ abstract class BaseNotificationHandler implements NotificationHandlerInterface
1111{
1212 public function supports (Notification $ message ): bool
1313 {
Original file line number Diff line number Diff line change 66
77use PhpLlm \McpSdk \Message \Notification ;
88
9- interface NotificationHandler
9+ interface NotificationHandlerInterface
1010{
1111 public function supports (Notification $ message ): bool ;
1212
Original file line number Diff line number Diff line change 55namespace PhpLlm \McpSdk \Server \RequestHandler ;
66
77use PhpLlm \McpSdk \Message \Request ;
8- use PhpLlm \McpSdk \Server \RequestHandler ;
8+ use PhpLlm \McpSdk \Server \RequestHandlerInterface ;
99
10- abstract class BaseRequestHandler implements RequestHandler
10+ abstract class BaseRequestHandler implements RequestHandlerInterface
1111{
1212 public function supports (Request $ message ): bool
1313 {
Original file line number Diff line number Diff line change 88use PhpLlm \McpSdk \Message \Request ;
99use PhpLlm \McpSdk \Message \Response ;
1010
11- interface RequestHandler
11+ interface RequestHandlerInterface
1212{
1313 public function supports (Request $ message ): bool ;
1414
Original file line number Diff line number Diff line change 44
55namespace PhpLlm \McpSdk \Server \Transport \Sse \Store ;
66
7- use PhpLlm \McpSdk \Server \Transport \Sse \Store ;
7+ use PhpLlm \McpSdk \Server \Transport \Sse \StoreInterface ;
88use Psr \Cache \CacheItemPoolInterface ;
99use Symfony \Component \Uid \Uuid ;
1010
11- final readonly class CachePoolStore implements Store
11+ final readonly class CachePoolStore implements StoreInterface
1212{
1313 public function __construct (
1414 private CacheItemPoolInterface $ cachePool ,
Original file line number Diff line number Diff line change 66
77use Symfony \Component \Uid \Uuid ;
88
9- interface Store
9+ interface StoreInterface
1010{
1111 public function push (Uuid $ id , string $ message ): void ;
1212
Original file line number Diff line number Diff line change 44
55namespace PhpLlm \McpSdk \Server \Transport \Sse ;
66
7- use PhpLlm \McpSdk \Server \Transport ;
7+ use PhpLlm \McpSdk \Server \TransportInterface ;
88use Symfony \Component \Uid \Uuid ;
99
10- final readonly class StreamTransport implements Transport
10+ final readonly class StreamTransport implements TransportInterface
1111{
1212 public function __construct (
1313 private string $ messageEndpoint ,
14- private Store $ store ,
14+ private StoreInterface $ store ,
1515 private Uuid $ id ,
1616 ) {
1717 }
You can’t perform that action at this time.
0 commit comments