Skip to content

Commit 08ac7b2

Browse files
CopilotiBotPeaches
andauthored
fix: avoid phpstan unreachable check in computer action match
Agent-Logs-Url: https://github.com/openai-php/client/sessions/cbf38960-5239-47a6-bbd5-f926ace70703 Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
1 parent 49c6c7c commit 08ac7b2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Responses/Responses/Output/OutputComputerToolCall.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ public function toArray(): array
118118
*/
119119
private static function mapAction(array $action): Click|DoubleClick|Drag|KeyPress|Move|Screenshot|Scroll|Type|Wait
120120
{
121-
return match ($action['type'] ?? null) {
121+
/** @var array<string, mixed> $untypedAction */
122+
$untypedAction = $action;
123+
124+
return match ($untypedAction['type'] ?? null) {
122125
'click' => Click::from($action),
123126
'double_click' => DoubleClick::from($action),
124127
'drag' => Drag::from($action),

0 commit comments

Comments
 (0)