snake(); return $this->cache->get($cacheKey, function (ItemInterface $item) use ($movieName) { $url = $this->host.self::SEARCH_URI.'?'.http_build_query(['query' => $movieName]); try { $response = $this->client->request('GET', $url, ['headers' => $this->getHeaders()]); $result = $response->getContent(); return $this->serializer->deserialize($result, MovieSearchContext::class, 'json'); } catch (\Throwable) { return null; } }); } private function getHeaders(): array { return ['Authorization' => 'Bearer '.$this->apiToken, 'accept' => 'application/json']; } }