Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Dec 9, 2022
1 parent a06836e commit 8f16bb9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/google/src/GoogleSuggester.php
Expand Up @@ -33,9 +33,12 @@ public function extract(): array

private function extractSuggests(string $url): void
{
$this->client->request($url);
if (! $this->client->request($url)) {
throw new GoogleException('kicked harvesting suggests');
}

$content = $this->client->getResponse()->getContent();
$data = json_decode($content, true, 512, JSON_THROW_ON_ERROR);
$data = json_decode($content, true, 512, \JSON_THROW_ON_ERROR);
if (! \is_array($data) || ! isset($data[1])) {
return;
}
Expand Down

0 comments on commit 8f16bb9

Please sign in to comment.