@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\Common\Cache\FilesystemCache; |
6 | 6 | use light\Easemob\Exception\HttpException; |
7 | -use light\Easemob\Exception\InvalidArgumentException; |
|
8 | 7 | use light\Easemob\Support\Log; |
9 | 8 | |
10 | 9 | /** |
@@ -26,6 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | protected $middlewares = []; |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $baseUri |
|
31 | + */ |
|
29 | 32 | public function __construct($baseUri) |
30 | 33 | { |
31 | 34 | $this->baseUri = $baseUri; |
@@ -82,7 +85,7 @@ discard block |
||
82 | 85 | * @param string $method |
83 | 86 | * @param array $options |
84 | 87 | * |
85 | - * @return mixed |
|
88 | + * @return ResponseInterface |
|
86 | 89 | */ |
87 | 90 | public function request($url, $method = 'GET', $options = []) |
88 | 91 | { |
@@ -111,7 +114,7 @@ discard block |
||
111 | 114 | * @param string $url |
112 | 115 | * @param array $options |
113 | 116 | * |
114 | - * @return mixed |
|
117 | + * @return ResponseInterface |
|
115 | 118 | */ |
116 | 119 | public function get($url, array $options = []) |
117 | 120 | { |
@@ -124,7 +127,7 @@ discard block |
||
124 | 127 | * @param string $url |
125 | 128 | * @param array $options |
126 | 129 | * |
127 | - * @return mixed |
|
130 | + * @return ResponseInterface |
|
128 | 131 | */ |
129 | 132 | public function post($url, $options = []) |
130 | 133 | { |
@@ -138,7 +141,7 @@ discard block |
||
138 | 141 | * @param string $url |
139 | 142 | * @param array $options |
140 | 143 | * |
141 | - * @return mixed |
|
144 | + * @return ResponseInterface |
|
142 | 145 | */ |
143 | 146 | public function delete($url, $options = []) |
144 | 147 | { |
@@ -151,7 +154,7 @@ discard block |
||
151 | 154 | * @param string $url |
152 | 155 | * @param array $options |
153 | 156 | * |
154 | - * @return mixed |
|
157 | + * @return ResponseInterface |
|
155 | 158 | */ |
156 | 159 | public function put($url, $options = []) |
157 | 160 | { |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use GuzzleHttp\Exception\RequestException; |
7 | 7 | use GuzzleHttp\HandlerStack; |
8 | 8 | use GuzzleHttp\Psr7; |
9 | -use GuzzleHttp\Psr7\Request; |
|
10 | 9 | use light\Easemob\Exception\HttpException; |
11 | 10 | use light\Easemob\Support\Log; |
12 | 11 | use Psr\Http\Message\ResponseInterface; |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace light\Easemob; |
4 | 4 | |
5 | -use Doctrine\Common\Cache\Cache; |
|
6 | 5 | use Doctrine\Common\Cache\FilesystemCache; |
7 | 6 | use light\Easemob\Core\AccessToken; |
8 | 7 | use light\Easemob\Core\Config; |