88use TraderInteractive \Util \Http ;
99use GuzzleHttp \Psr7 \Request ;
1010use Psr \Http \Message \ResponseInterface ;
11+ use Psr \Http \Message \RequestInterface ;
1112use Psr \SimpleCache \CacheInterface ;
1213
1314/**
@@ -62,50 +63,36 @@ final class Client implements ClientInterface
6263 ];
6364
6465 /**
65- * Base url of the API server
66- *
6766 * @var string
6867 */
6968 private $ baseUrl ;
7069
7170 /**
72- * HTTP Adapter for sending request to the api
73- *
7471 * @var AdapterInterface
7572 */
7673 private $ adapter ;
7774
7875 /**
79- * Oauth authentication implementation
80- *
8176 * @var Authentication
8277 */
8378 private $ authentication ;
8479
8580 /**
86- * API access token
87- *
8881 * @var string
8982 */
9083 private $ accessToken ;
9184
9285 /**
93- * API refresh token
94- *
9586 * @var string
9687 */
9788 private $ refreshToken ;
9889
9990 /**
100- * Storage for cached API responses
101- *
10291 * @var CacheInterface
10392 */
10493 private $ cache ;
10594
10695 /**
107- * Strategy for caching
108- *
10996 * @var int
11097 */
11198 private $ cacheMode ;
@@ -127,13 +114,13 @@ final class Client implements ClientInterface
127114 /**
128115 * Create a new instance of Client
129116 *
130- * @param AdapterInterface $adapter
131- * @param Authentication $authentication
132- * @param string $baseUrl
133- * @param int $cacheMode
134- * @param Cache $cache
135- * @param string $accessToken
136- * @param string $refreshToken
117+ * @param AdapterInterface $adapter HTTP Adapter for sending request to the api
118+ * @param Authentication $authentication Oauth authentication implementation
119+ * @param string $baseUrl Base url of the API server
120+ * @param int $cacheMode Strategy for caching
121+ * @param CacheInterface $cache Storage for cached API responses
122+ * @param string $accessToken API access token
123+ * @param string $refreshToken API refresh token
137124 *
138125 * @throws \InvalidArgumentException Thrown if $baseUrl is not a non-empty string
139126 * @throws \InvalidArgumentException Thrown if $cacheMode is not one of the cache mode constants
@@ -463,7 +450,7 @@ private function start(string $url, string $method, string $body = null, array $
463450 return $ key ;
464451 }
465452
466- private function getCacheKey (Request $ request ) : string
453+ private function getCacheKey (RequestInterface $ request ) : string
467454 {
468455 return CacheHelper::getCacheKey ($ request );
469456 }
0 commit comments