Skip to content

Commit d442058

Browse files
Fix json_decode calls
1 parent d2caecc commit d442058

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/platform/src/Bridge/DeepSeek/ResultConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private function convertChoice(array $choice): ToolCallResult|TextResult
179179
*/
180180
private function convertToolCall(array $toolCall): ToolCall
181181
{
182-
$arguments = json_decode($toolCall['function']['arguments'], true, \JSON_THROW_ON_ERROR);
182+
$arguments = json_decode($toolCall['function']['arguments'], true, flags: \JSON_THROW_ON_ERROR);
183183

184184
return new ToolCall($toolCall['id'], $toolCall['function']['name'], $arguments);
185185
}

src/platform/src/Bridge/DockerModelRunner/Completions/ResultConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private function convertChoice(array $choice): ToolCallResult|TextResult
186186
*/
187187
private function convertToolCall(array $toolCall): ToolCall
188188
{
189-
$arguments = json_decode($toolCall['function']['arguments'], true, \JSON_THROW_ON_ERROR);
189+
$arguments = json_decode($toolCall['function']['arguments'], true, flags: \JSON_THROW_ON_ERROR);
190190

191191
return new ToolCall($toolCall['id'], $toolCall['function']['name'], $arguments);
192192
}

src/platform/src/Bridge/Mistral/Llm/ResultConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private function convertChoice(array $choice): ToolCallResult|TextResult
179179
*/
180180
private function convertToolCall(array $toolCall): ToolCall
181181
{
182-
$arguments = json_decode((string) $toolCall['function']['arguments'], true, \JSON_THROW_ON_ERROR);
182+
$arguments = json_decode((string) $toolCall['function']['arguments'], true, flags: \JSON_THROW_ON_ERROR);
183183

184184
return new ToolCall($toolCall['id'], $toolCall['function']['name'], $arguments);
185185
}

src/platform/src/Bridge/OpenAi/Gpt/ResultConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private function convertChoice(array $choice): ToolCallResult|TextResult
204204
*/
205205
private function convertToolCall(array $toolCall): ToolCall
206206
{
207-
$arguments = json_decode($toolCall['function']['arguments'], true, \JSON_THROW_ON_ERROR);
207+
$arguments = json_decode($toolCall['function']['arguments'], true, flags: \JSON_THROW_ON_ERROR);
208208

209209
return new ToolCall($toolCall['id'], $toolCall['function']['name'], $arguments);
210210
}

src/platform/src/Bridge/Scaleway/Llm/ResultConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private function convertChoice(array $choice): ToolCallResult|TextResult
174174
*/
175175
private function convertToolCall(array $toolCall): ToolCall
176176
{
177-
$arguments = json_decode($toolCall['function']['arguments'], true, \JSON_THROW_ON_ERROR);
177+
$arguments = json_decode($toolCall['function']['arguments'], true, flags: \JSON_THROW_ON_ERROR);
178178

179179
return new ToolCall($toolCall['id'], $toolCall['function']['name'], $arguments);
180180
}

0 commit comments

Comments
 (0)