@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | - * @return array containing client id and secret |
|
| 117 | + * @return string[] containing client id and secret |
|
| 118 | 118 | */ |
| 119 | 119 | public function getCredentials() |
| 120 | 120 | { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | /** |
| 155 | 155 | * General purpose 'GET' request against API |
| 156 | 156 | * @param $entrypoint string contains either an @entrypoint or full URL obtained from a resource |
| 157 | - * @return mixed |
|
| 157 | + * @return \stdClass |
|
| 158 | 158 | */ |
| 159 | 159 | public function get($entrypoint) |
| 160 | 160 | { |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | /** |
| 165 | 165 | * General purpose 'POST' request against API |
| 166 | - * @param $entrypoint string contains either an @entrypoint or full URL obtained from a resource |
|
| 166 | + * @param string $entrypoint string contains either an @entrypoint or full URL obtained from a resource |
|
| 167 | 167 | * @param $json string contains JSON formatted data to post |
| 168 | - * @return mixed |
|
| 168 | + * @return \stdClass |
|
| 169 | 169 | */ |
| 170 | 170 | public function post($entrypoint, $json) |
| 171 | 171 | { |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | /** |
| 176 | 176 | * General purpose 'PUT' request against API |
| 177 | 177 | * @param $entrypoint string contains either an @entrypoint or full URL obtained from a resource |
| 178 | - * @return mixed string contains JSON formatted data to put |
|
| 178 | + * @return \stdClass string contains JSON formatted data to put |
|
| 179 | 179 | */ |
| 180 | 180 | public function put($entrypoint, $json) |
| 181 | 181 | { |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | /** |
| 213 | - * @param $method |
|
| 213 | + * @param string $method |
|
| 214 | 214 | * @param $entrypoint |
| 215 | 215 | * @param null $json |
| 216 | 216 | * @return \stdClass object containing JSON decoded response |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | /** |
| 316 | - * @param $key |
|
| 316 | + * @param string $key |
|
| 317 | 317 | * @return bool |
| 318 | 318 | * @codeCoverageIgnore |
| 319 | 319 | */ |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
| 331 | - * @param $key |
|
| 331 | + * @param string $key |
|
| 332 | 332 | * @return mixed |
| 333 | 333 | * @codeCoverageIgnore |
| 334 | 334 | */ |
@@ -343,10 +343,10 @@ discard block |
||
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | /** |
| 346 | - * @param $key |
|
| 346 | + * @param string $key |
|
| 347 | 347 | * @param $value |
| 348 | - * @param null $ttl |
|
| 349 | - * @return mixed |
|
| 348 | + * @param integer $ttl |
|
| 349 | + * @return boolean |
|
| 350 | 350 | * @codeCoverageIgnore |
| 351 | 351 | */ |
| 352 | 352 | protected function cacheSet($key, $value, $ttl = null) |
@@ -2,12 +2,10 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace LibLynx\Connect; |
| 4 | 4 | |
| 5 | +use GuzzleHttp\Client as GuzzleClient; |
|
| 5 | 6 | use GuzzleHttp\Exception\RequestException; |
| 6 | -use GuzzleHttp\Psr7\Request; |
|
| 7 | -use kamermans\OAuth2\GrantType\ClientCredentials; |
|
| 8 | -use kamermans\OAuth2\OAuth2Middleware; |
|
| 9 | 7 | use GuzzleHttp\HandlerStack; |
| 10 | -use GuzzleHttp\Client as GuzzleClient; |
|
| 8 | +use GuzzleHttp\Psr7\Request; |
|
| 11 | 9 | use Kevinrob\GuzzleCache\CacheMiddleware; |
| 12 | 10 | use Kevinrob\GuzzleCache\Storage\Psr16CacheStorage; |
| 13 | 11 | use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy; |
@@ -18,6 +16,8 @@ discard block |
||
| 18 | 16 | use Psr\Log\NullLogger; |
| 19 | 17 | use Psr\SimpleCache\CacheInterface; |
| 20 | 18 | use Psr\SimpleCache\InvalidArgumentException; |
| 19 | +use kamermans\OAuth2\GrantType\ClientCredentials; |
|
| 20 | +use kamermans\OAuth2\OAuth2Middleware; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * LibLynx Connect API client |