Skip to content

Commit c3cadd8

Browse files
committed
-
1 parent f92b0b9 commit c3cadd8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/agent/src/Bridge/Brave/Brave.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ public function __invoke(
6363
$data = $result->toArray();
6464

6565
$results = [];
66-
if (isset($data['web']) && is_array($data['web']) && isset($data['web']['results']) && is_array($data['web']['results'])) {
66+
if (isset($data['web']) && \is_array($data['web']) && isset($data['web']['results']) && \is_array($data['web']['results'])) {
6767
$results = $data['web']['results'];
6868
}
6969

7070
return array_values(array_map(static function (mixed $result): array {
71-
if (!is_array($result)) {
71+
if (!\is_array($result)) {
7272
return ['title' => '', 'description' => '', 'url' => ''];
7373
}
7474

7575
return [
76-
'title' => is_string($result['title'] ?? null) ? $result['title'] : '',
77-
'description' => is_string($result['description'] ?? null) ? $result['description'] : '',
78-
'url' => is_string($result['url'] ?? null) ? $result['url'] : '',
76+
'title' => \is_string($result['title'] ?? null) ? $result['title'] : '',
77+
'description' => \is_string($result['description'] ?? null) ? $result['description'] : '',
78+
'url' => \is_string($result['url'] ?? null) ? $result['url'] : '',
7979
];
8080
}, $results));
8181
}

src/agent/src/Bridge/Brave/Tests/BraveTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\AI\Agent\Bridge\Brave\Brave;
1616
use Symfony\Component\HttpClient\MockHttpClient;
1717
use Symfony\Component\HttpClient\Response\JsonMockResponse;
18-
use Symfony\Component\HttpClient\Response\MockResponse;
1918

2019
final class BraveTest extends TestCase
2120
{

0 commit comments

Comments
 (0)