Completed
Push — master ( d1bca4...94350e )
by Bai
10s
created
src/Qiniu/Storage/BucketManager.php 2 patches
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -264,12 +264,19 @@  discard block
 block discarded – undo
264 264
         return $this->rsPost('/batch', $params);
265 265
     }
266 266
 
267
+    /**
268
+     * @param string $path
269
+     * @param string $body
270
+     */
267 271
     private function rsPost($path, $body = null)
268 272
     {
269 273
         $url = Config::RS_HOST . $path;
270 274
         return $this->post($url, $body);
271 275
     }
272 276
 
277
+    /**
278
+     * @param string $path
279
+     */
273 280
     private function rsGet($path)
274 281
     {
275 282
         $url = Config::RS_HOST . $path;
@@ -282,6 +289,9 @@  discard block
 block discarded – undo
282 289
         return $this->post($url, $body);
283 290
     }
284 291
 
292
+    /**
293
+     * @param string $url
294
+     */
285 295
     private function get($url)
286 296
     {
287 297
         $headers = $this->auth->authorization($url);
@@ -292,6 +302,9 @@  discard block
 block discarded – undo
292 302
         return array($ret->json(), null);
293 303
     }
294 304
 
305
+    /**
306
+     * @param string $url
307
+     */
295 308
     private function post($url, $body)
296 309
     {
297 310
         $headers = $this->auth->authorization($url, $body, 'application/x-www-form-urlencoded');
@@ -332,6 +345,9 @@  discard block
 block discarded – undo
332 345
         return self::oneKeyBatch('stat', $bucket, $keys);
333 346
     }
334 347
 
348
+    /**
349
+     * @param string $operation
350
+     */
335 351
     private static function oneKeyBatch($operation, $bucket, $keys)
336 352
     {
337 353
         $data = array();
@@ -341,6 +357,9 @@  discard block
 block discarded – undo
341 357
         return $data;
342 358
     }
343 359
 
360
+    /**
361
+     * @param string $operation
362
+     */
344 363
     private static function twoKeyBatch($operation, $source_bucket, $key_pairs, $target_bucket)
345 364
     {
346 365
         if ($target_bucket === null) {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 
4 4
 use Qiniu\Auth;
5 5
 use Qiniu\Config;
6
-use Qiniu\Zone;
7 6
 use Qiniu\Http\Client;
8 7
 use Qiniu\Http\Error;
8
+use Qiniu\Zone;
9 9
 
10 10
 /**
11 11
  * 主要涉及了空间资源管理及批量操作接口的实现,具体的接口规格可以参考
Please login to merge, or discard this patch.