Passed
Push — master ( c3677e...93f23d )
by Ryosuke
07:29
created
src/ClientInterface.php 1 patch
Doc Comments   +84 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,14 +30,19 @@  discard block
 block discarded – undo
30 30
      *       e.g. [CURLOPT_USERAGENT => 'abc'],
31 31
      *            ['CURLOPT_USERAGENT' => 'abc']
32 32
      *
33
-     * @param bool $assoc
34
-     *     Use Assoc-style or not.
35 33
      *
36
-     * @param bool $stringify
37
-     *     Stringify CURLOPT_* constant names or not.
34
+     * @return void
38 35
      */
39 36
     public function __construct(array $credentials, array $options = []);
37
+
38
+    /**
39
+     * @return Traits\BaseClientTrait
40
+     */
40 41
     public function withCredentials(array $credentails); // : ClientInterface
42
+
43
+    /**
44
+     * @return Traits\BaseClientTrait
45
+     */
41 46
     public function withOptions(array $options); // : ClientInterface
42 47
     public function getCredentials($assoc = false); // : array
43 48
     public function getOptions($stringify = false); // : array
@@ -46,15 +51,12 @@  discard block
 block discarded – undo
46 51
      * Retrive part of credentials using magic methods or ArrayAccess interface.
47 52
      *
48 53
      * @param string $key
49
-     * @param string $offset
50
-     *
51
-     *       e.g.
52
-     *           $a = $client->consumer_key;
53
-     *           $b = $client['consumer_secret'];
54
-     *           $c = $client[2];
55
-     *           $d = $client->tokenSecret;
56 54
      */
57 55
     public function __get($key); // : string
56
+
57
+    /**
58
+     * @return boolean
59
+     */
58 60
     public function __isset($key); // : boolean
59 61
     public function offsetGet($offset); // : string
60 62
     public function offsetExists($offset); // : boolean
@@ -72,18 +74,31 @@  discard block
 block discarded – undo
72 74
      * login() uses scraping.
73 75
      *
74 76
      * @param string|null $oauth_callback Callback URL or "oob".
75
-     * @param string      $oauth_verifier
76
-     * @param string      $username       Username or email.
77
-     * @param string      $password
78 77
      * @throws HttpExceptionInterface
79 78
      */
80 79
     public function oauthForRequestToken($oauth_callback = null); // : ClientInterface
81 80
     public function oauthForAccessToken($oauth_verifier); // : ClientInterface
82 81
     public function xauthForAccessToken($username, $password); // : ClientInterface
83 82
     public function login($username, $password); // : ClientInterface
83
+
84
+    /**
85
+     * @return \Generator
86
+     */
84 87
     public function oauthForRequestTokenAsync($oauth_callback = null); // : \Generator<ClientInterface>
88
+
89
+    /**
90
+     * @return \Generator
91
+     */
85 92
     public function oauthForAccessTokenAsync($oauth_verifier); // : \Generator<ClientInterface>
93
+
94
+    /**
95
+     * @return \Generator
96
+     */
86 97
     public function xauthForAccessTokenAsync($username, $password); // : \Generator<ClientInterface>
98
+
99
+    /**
100
+     * @return \Generator
101
+     */
87 102
     public function loginAsync($username, $password); // : \Generator<ClientInterface>
88 103
 
89 104
     /**
@@ -108,8 +123,20 @@  discard block
 block discarded – undo
108 123
     public function get($endpoint, array $params = [], $return_response_object = false); // : \stdClass|array|MediaInterface|ResponseInterface
109 124
     public function post($endpoint, array $params = [], $return_response_object = false); // : \stdClass|ResponseInterface
110 125
     public function postMultipart($endpoint, array $params = [], $return_response_object = false); // : \stdClass|ResponseInterface
126
+
127
+    /**
128
+     * @return \Generator
129
+     */
111 130
     public function getAsync($endpoint, array $params = [], $return_response_object = false); // : \Generator<\stdClass|array|MediaInterface|ResponseInterface
131
+
132
+    /**
133
+     * @return \Generator
134
+     */
112 135
     public function postAsync($endpoint, array $params = [], $return_response_object = false); // : \Generator<\stdClass|ResponseInterface>
136
+
137
+    /**
138
+     * @return \Generator
139
+     */
113 140
     public function postMultipartAsync($endpoint, array $params = [], $return_response_object = false); // : \Generator<\stdClass|ResponseInterface>
114 141
 
115 142
     /**
@@ -133,8 +160,20 @@  discard block
 block discarded – undo
133 160
     public function getOut($url, array $params = [], $return_response_object = false); // : \stdClass|array|ResponseInterface
134 161
     public function postOut($url, array $params = [], $return_response_object = false); // : \stdClass|ResponseInterface
135 162
     public function postMultipartOut($url, array $params = [], $return_response_object = false); // : \stdClass|ResponseInterface
163
+
164
+    /**
165
+     * @return \Generator
166
+     */
136 167
     public function getOutAsync($url, array $params = [], $return_response_object = false); // : \Generator<\stdClass|array|ResponseInterface
168
+
169
+    /**
170
+     * @return \Generator
171
+     */
137 172
     public function postOutAsync($url, array $params = [], $return_response_object = false); // : \Generator<\stdClass|ResponseInterface>
173
+
174
+    /**
175
+     * @return \Generator
176
+     */
138 177
     public function postMultipartOutAsync($url, array $params = [], $return_response_object = false); // : \Generator<\stdClass|ResponseInterface>
139 178
 
140 179
     /**
@@ -163,8 +202,13 @@  discard block
 block discarded – undo
163 202
      *       Signature: function (ResponseInterface $response);
164 203
      *
165 204
      * @throws HttpExceptionInterface
205
+     * @return void
166 206
      */
167 207
     public function streaming($endpoint, callable $event_handler, array $params = [], callable $header_response_handler = null); // : null
208
+
209
+    /**
210
+     * @return \Generator
211
+     */
168 212
     public function streamingAsync($endpoint, callable $event_handler, array $params = [], callable $header_response_handler = null); // : \Generator<null>
169 213
 
170 214
     /**
@@ -188,10 +232,23 @@  discard block
 block discarded – undo
188 232
      *     File data is split into chunks with specified size.
189 233
      *
190 234
      * @throws HttpExceptionInterface
235
+     * @return \Generator
191 236
      */
192 237
     public function uploadAsync(\SplFileObject $file, $media_category = null, callable $on_uploading = null, callable $on_processing = null, $chunk_size = 300000); // : \Generator<\stdClass>
238
+
239
+    /**
240
+     * @return \Generator
241
+     */
193 242
     public function uploadImageAsync(\SplFileObject $file, callable $on_uploading = null, callable $on_processing = null, $chunk_size = 300000); // : \Generator<\stdClass>
243
+
244
+    /**
245
+     * @return \Generator
246
+     */
194 247
     public function uploadAnimeGifAsync(\SplFileObject $file, callable $on_uploading = null, callable $on_processing = null, $chunk_size = 300000); // : \Generator<\stdClass>
248
+
249
+    /**
250
+     * @return \Generator
251
+     */
195 252
     public function uploadVideoAsync(\SplFileObject $file, callable $on_uploading = null, callable $on_processing = null, $chunk_size = 300000); // : \Generator<\stdClass>
196 253
 
197 254
     /**
@@ -200,14 +257,23 @@  discard block
 block discarded – undo
200 257
      * @throws HttpExceptionInterface
201 258
      */
202 259
     public function oauthForBearerToken(); // : ClientInterface
260
+
261
+    /**
262
+     * @return \Generator
263
+     */
203 264
     public function oauthForBearerTokenAsync(); // : \Generator<ClientInterface>
204 265
 
205 266
     /**
206 267
      * Invalidate OAuth 2.0 token.
207 268
      *
208 269
      * @throws HttpExceptionInterface
270
+     * @return void
209 271
      */
210 272
     public function invalidateBearerToken(); // : null
273
+
274
+    /**
275
+     * @return \Generator
276
+     */
211 277
     public function invalidateBearerTokenAsync(); // : \Generator<null>
212 278
 
213 279
     /**
@@ -228,5 +294,9 @@  discard block
 block discarded – undo
228 294
      * @throws HttpExceptionInterface
229 295
      */
230 296
     public function get2($endpoint, array $params = [], $return_response_object = false); // : \stdClass|array|ResponseInterface
297
+
298
+    /**
299
+     * @return \Generator
300
+     */
231 301
     public function get2Async($endpoint, array $params = [], $return_response_object = false); // : \Generator<\stdClass|array|ResponseInterface>
232 302
 }
Please login to merge, or discard this patch.