1 | <?php |
||
16 | class NoProxy implements GoogleProxyInterface |
||
17 | { |
||
18 | /** {@inheritdoc} */ |
||
19 | 4 | public function getHttpResponse(string $url): ResponseInterface |
|
20 | { |
||
21 | 4 | if (!filter_var($url, FILTER_VALIDATE_URL)) { |
|
22 | 1 | throw new InvalidUrlException("Invalid Google URL: $url"); |
|
23 | } |
||
24 | |||
25 | 3 | return (new Client())->request('GET', $url); |
|
26 | } |
||
27 | |||
28 | /** {@inheritdoc} */ |
||
29 | 4 | public function parseUrl(string $url): string |
|
44 | } |
||
45 |