src/Provider/Http/UdgerCom.php 1 location
|
@@ 154-156 (lines=3) @@
|
| 151 |
|
/* |
| 152 |
|
* Missing data? |
| 153 |
|
*/ |
| 154 |
|
if (! $content instanceof stdClass || ! isset($content->info)) { |
| 155 |
|
throw new Exception\RequestException('Could not get valid response from "' . $request->getUri() . '". Response is "' . $response->getBody()->getContents() . '"'); |
| 156 |
|
} |
| 157 |
|
|
| 158 |
|
return $content; |
| 159 |
|
} |
src/Provider/Http/UserAgentApiCom.php 1 location
|
@@ 149-151 (lines=3) @@
|
| 146 |
|
/* |
| 147 |
|
* Missing data? |
| 148 |
|
*/ |
| 149 |
|
if (! $content instanceof stdClass || ! isset($content->data)) { |
| 150 |
|
throw new Exception\RequestException('Could not get valid response from "' . $request->getUri() . '". Data is missing "' . $response->getBody()->getContents() . '"'); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
return $content->data; |
| 154 |
|
} |
src/Provider/Http/DeviceAtlasCom.php 1 location
|
@@ 118-120 (lines=3) @@
|
| 115 |
|
|
| 116 |
|
$content = json_decode($response->getBody()->getContents()); |
| 117 |
|
|
| 118 |
|
if (! $content instanceof stdClass || ! isset($content->properties)) { |
| 119 |
|
throw new Exception\RequestException('Could not get valid response from "' . $request->getUri() . '". Response is "' . $response->getBody()->getContents() . '"'); |
| 120 |
|
} |
| 121 |
|
|
| 122 |
|
/* |
| 123 |
|
* No result found? |
src/Provider/Http/WhatIsMyBrowserCom.php 1 location
|
@@ 146-148 (lines=3) @@
|
| 143 |
|
throw new Exception\InvalidCredentialsException('Your API key "' . $this->apiKey . '" is not valid for ' . $this->getName()); |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
if (!isset($content->result) || $content->result !== 'success') { |
| 147 |
|
throw new Exception\RequestException('Could not get valid response from "' . $request->getUri() . '". Response is "' . $response->getBody()->getContents() . '"'); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
/* |
| 151 |
|
* Missing data? |