Skip to content

Commit da10408

Browse files
committed
Fixed PHPStan errors
1 parent 3e210f6 commit da10408

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ php artisan loop:mcp:generate-config
146146
To run the MCP server using STDIO, we provide the following artisan command:
147147

148148
```bash
149-
php artisan loop:mcp:start [--user-id=1] [--user-model=App\Models\User] [--debug]
149+
php artisan loop:mcp:start [--user-id=1 [--user-model=] [--auth-guard=] [--debug]
150150
```
151151
152152
To connect Laravel Loop MCP server to Claude Code, for example, you can use the following command:

src/Commands/LoopMcpServerStartCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function handle(McpHandler $mcpHandler): int
3131
}
3232

3333
if ($this->option('user-id')) {
34+
/** @var string|null */
3435
$authGuard = $this->option('auth-guard') ?? config('auth.defaults.guard');
3536
$userModel = $this->option('user-model') ?? 'App\\Models\\User';
3637
$user = $userModel::find($this->option('user-id'));
@@ -134,8 +135,9 @@ public function handle(McpHandler $mcpHandler): int
134135
return Command::SUCCESS;
135136
}
136137

137-
protected function debug($message)
138+
protected function debug(string $message): void
138139
{
139-
$this->getOutput()->getOutput()->getErrorOutput()->writeln($message);
140+
141+
$this->getOutput()->getOutput()->getErrorOutput()->writeln($message); // @phpstan-ignore method.notFound
140142
}
141143
}

0 commit comments

Comments
 (0)