Skip to content

Commit 241baaa

Browse files
committed
Merge branch 'master' of github.com:opgginc/laravel-mcp-server
2 parents 5013c6c + acaa68d commit 241baaa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Console/Commands/MigrateToolsCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ private function migrateFromV1_1(string $content): string
216216
// Find messageType method and determine if it's SSE or HTTP
217217
if (preg_match('/(public function messageType\(\): ProcessMessageType\s*\{[^}]*\})/s', $content, $matches)) {
218218
$messageTypeMethod = $matches[1];
219-
219+
220220
// Check if the messageType returns SSE
221221
$isSSE = str_contains($messageTypeMethod, 'ProcessMessageType::SSE');
222-
222+
223223
if ($isSSE) {
224224
// For SSE tools: Replace messageType with isStreaming() returning true
225225
$isStreamingMethod = ' public function isStreaming(): bool'.PHP_EOL.
@@ -230,13 +230,13 @@ private function migrateFromV1_1(string $content): string
230230
} else {
231231
// For HTTP tools: Just remove the messageType method completely
232232
$modifiedContent = str_replace($messageTypeMethod, '', $modifiedContent);
233-
233+
234234
// Clean up any extra newlines left behind
235235
$modifiedContent = preg_replace('/\n\s*\n\s*\n/', "\n\n", $modifiedContent);
236236
}
237-
237+
238238
// Remove the ProcessMessageType import if it's no longer needed
239-
if (!$isSSE && !str_contains($modifiedContent, 'ProcessMessageType::')) {
239+
if (! $isSSE && ! str_contains($modifiedContent, 'ProcessMessageType::')) {
240240
$modifiedContent = preg_replace('/use OPGG\\\\LaravelMcpServer\\\\Enums\\\\ProcessMessageType;\s*\n/', '', $modifiedContent);
241241
}
242242
}

0 commit comments

Comments
 (0)