File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ public function initialize(InitializeData $data): InitializeResource
208208 // Validate and determine the protocol version to use
209209 $ requestedProtocolVersion = $ data ->protocolVersion ?? MCPProtocolInterface::PROTOCOL_VERSION_SSE ;
210210 $ protocolVersion = $ this ->getValidatedProtocolVersion ($ requestedProtocolVersion );
211-
211+
212212 $ hasSamplingCapability = isset ($ data ->capabilities ['sampling ' ]);
213213 $ this ->protocol ->setClientSamplingCapability ($ hasSamplingCapability );
214214
@@ -222,9 +222,10 @@ public function initialize(InitializeData $data): InitializeResource
222222
223223 /**
224224 * Validates the requested protocol version and returns a supported version.
225- *
226- * @param string $requestedVersion The protocol version requested by the client
225+ *
226+ * @param string $requestedVersion The protocol version requested by the client
227227 * @return string A supported protocol version
228+ *
228229 * @throws JsonRpcErrorException If the requested protocol version is not supported
229230 */
230231 private function getValidatedProtocolVersion (string $ requestedVersion ): string
Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ public function test_initialize_throws_exception_for_unsupported_protocol_versio
565565 } catch (JsonRpcErrorException $ e ) {
566566 $ this ->assertEquals (-32602 , $ e ->getJsonRpcErrorCode ());
567567 $ this ->assertEquals ('Unsupported protocol version ' , $ e ->getMessage ());
568-
568+
569569 $ errorData = $ e ->getErrorData ();
570570 $ this ->assertIsArray ($ errorData );
571571 $ this ->assertArrayHasKey ('supported ' , $ errorData );
You can’t perform that action at this time.
0 commit comments