Completed
Pull Request — master (#267)
by
unknown
13:17
created
src/Qiniu/Storage/UploadManager.php 1 patch
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,8 @@
 block discarded – undo
2 2
 namespace Qiniu\Storage;
3 3
 
4 4
 use Qiniu\Config;
5
-use Qiniu\Http\HttpClient;
6
-use Qiniu\Storage\ResumeUploader;
7 5
 use Qiniu\Storage\FormUploader;
6
+use Qiniu\Storage\ResumeUploader;
8 7
 
9 8
 /**
10 9
  * 主要涉及了资源上传接口的实现
Please login to merge, or discard this patch.
src/Qiniu/Processing/PersistentFop.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 use Qiniu\Config;
5 5
 use Qiniu\Http\Client;
6 6
 use Qiniu\Http\Error;
7
-use Qiniu\Processing\Operation;
8 7
 
9 8
 /**
10 9
  * 持久化处理类,该类用于主动触发异步持久化操作.
Please login to merge, or discard this patch.
src/Qiniu/functions.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      * array 辅助方法,无值时不set
128 128
      *
129 129
      * @param $array 待操作array
130
-     * @param $key key
130
+     * @param string $key key
131 131
      * @param $value value 为null时 不设置
132 132
      *
133 133
      * @return array 原来的array,便于连续操作
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @param  string $url 图片链接
180 180
      * @param  string $image 水印图片链接
181
-     * @param  numeric $dissolve 透明度
181
+     * @param  integer $dissolve 透明度
182 182
      * @param  string $gravity 水印位置
183 183
      * @param  numeric $dx 横轴边距
184 184
      * @param  numeric $dy 纵轴边距
@@ -210,9 +210,9 @@  discard block
 block discarded – undo
210 210
      * @param  string $url 图片链接
211 211
      * @param  string $text 文字
212 212
      * @param  string $font 文字字体
213
-     * @param  string $fontSize 文字字号
213
+     * @param  integer $fontSize 文字字号
214 214
      * @param  string $fontColor 文字颜色
215
-     * @param  numeric $dissolve 透明度
215
+     * @param  integer $dissolve 透明度
216 216
      * @param  string $gravity 水印位置
217 217
      * @param  numeric $dx 横轴边距
218 218
      * @param  numeric $dy 纵轴边距
Please login to merge, or discard this patch.
src/Qiniu/Storage/BucketManager.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 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;
9 8
 
Please login to merge, or discard this patch.
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -351,24 +351,36 @@  discard block
 block discarded – undo
351 351
         return $scheme . Config::API_HOST;
352 352
     }
353 353
 
354
+    /**
355
+     * @param string $body
356
+     */
354 357
     private function rsPost($path, $body = null)
355 358
     {
356 359
         $url = $this->getRsHost() . $path;
357 360
         return $this->post($url, $body);
358 361
     }
359 362
 
363
+    /**
364
+     * @param string $path
365
+     */
360 366
     private function apiGet($path)
361 367
     {
362 368
         $url = $this->getApiHost() . $path;
363 369
         return $this->get($url);
364 370
     }
365 371
 
372
+    /**
373
+     * @param string $path
374
+     */
366 375
     private function rsGet($path)
367 376
     {
368 377
         $url = $this->getRsHost() . $path;
369 378
         return $this->get($url);
370 379
     }
371 380
 
381
+    /**
382
+     * @param string $url
383
+     */
372 384
     private function get($url)
373 385
     {
374 386
         $headers = $this->auth->authorization($url);
@@ -379,6 +391,9 @@  discard block
 block discarded – undo
379 391
         return array($ret->json(), null);
380 392
     }
381 393
 
394
+    /**
395
+     * @param string $url
396
+     */
382 397
     private function post($url, $body)
383 398
     {
384 399
         $headers = $this->auth->authorization($url, $body, 'application/x-www-form-urlencoded');
@@ -446,6 +461,9 @@  discard block
 block discarded – undo
446 461
         return $data;
447 462
     }
448 463
 
464
+    /**
465
+     * @param string $operation
466
+     */
449 467
     private static function oneKeyBatch($operation, $bucket, $keys)
450 468
     {
451 469
         $data = array();
@@ -455,6 +473,9 @@  discard block
 block discarded – undo
455 473
         return $data;
456 474
     }
457 475
 
476
+    /**
477
+     * @param string $operation
478
+     */
458 479
     private static function twoKeyBatch($operation, $source_bucket, $key_pairs, $target_bucket, $force)
459 480
     {
460 481
         if ($target_bucket === null) {
Please login to merge, or discard this patch.
src/Qiniu/Storage/ResumeUploader.php 1 patch
Doc Comments   +11 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,10 +30,11 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @param $upToken    上传凭证
32 32
      * @param $key        上传文件名
33
-     * @param $inputStream 上传二进制流
33
+     * @param resource $inputStream 上传二进制流
34 34
      * @param $size       上传流的大小
35 35
      * @param $params     自定义变量
36
-     * @param $mime       上传数据的mimeType
36
+     * @param string $mime       上传数据的mimeType
37
+     * @param Config $config
37 38
      *
38 39
      * @link http://developer.qiniu.com/docs/v6/api/overview/up/response/vars.html#xvar
39 40
      */
@@ -70,6 +71,7 @@  discard block
 block discarded – undo
70 71
 
71 72
     /**
72 73
      * 上传操作
74
+     * @param string $fname
73 75
      */
74 76
     public function upload($fname)
75 77
     {
@@ -111,6 +113,7 @@  discard block
 block discarded – undo
111 113
 
112 114
     /**
113 115
      * 创建块
116
+     * @param string $block
114 117
      */
115 118
     private function makeBlock($block, $blockSize)
116 119
     {
@@ -152,6 +155,9 @@  discard block
 block discarded – undo
152 155
         return array($response->json(), null);
153 156
     }
154 157
 
158
+    /**
159
+     * @param string $url
160
+     */
155 161
     private function post($url, $data)
156 162
     {
157 163
         $this->currentUrl = $url;
@@ -159,6 +165,9 @@  discard block
 block discarded – undo
159 165
         return Client::post($url, $data, $headers);
160 166
     }
161 167
 
168
+    /**
169
+     * @param integer $uploaded
170
+     */
162 171
     private function blockSize($uploaded)
163 172
     {
164 173
         if ($this->size < $uploaded + Config::BLOCK_SIZE) {
Please login to merge, or discard this patch.
src/Qiniu/Auth.php 2 patches
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  discard block
 block discarded – undo
19 19
         return $this->accessKey;
20 20
     }
21 21
 
22
+    /**
23
+     * @param string $data
24
+     */
22 25
     public function sign($data)
23 26
     {
24 27
         $hmac = hash_hmac('sha1', $data, $this->secretKey, true);
@@ -26,6 +29,9 @@  discard block
 block discarded – undo
26 29
         return $this->accessKey . ':' . \Qiniu\base64_urlSafeEncode($hmac);
27 30
     }
28 31
 
32
+    /**
33
+     * @param string $data
34
+     */
29 35
     public function signWithData($data)
30 36
     {
31 37
         $encodedData = \Qiniu\base64_urlSafeEncode($data);
@@ -120,6 +126,9 @@  discard block
 block discarded – undo
120 126
         'isPrefixalScope',
121 127
     );
122 128
 
129
+    /**
130
+     * @param boolean $strictPolicy
131
+     */
123 132
     private static function copyPolicy(&$policy, $originPolicy, $strictPolicy)
124 133
     {
125 134
         if ($originPolicy === null) {
@@ -133,6 +142,9 @@  discard block
 block discarded – undo
133 142
         return $policy;
134 143
     }
135 144
 
145
+    /**
146
+     * @param string $contentType
147
+     */
136 148
     public function authorization($url, $body = null, $contentType = null)
137 149
     {
138 150
         $authorization = 'QBox ' . $this->signRequest($url, $body, $contentType);
@@ -186,6 +198,10 @@  discard block
 block discarded – undo
186 198
         return array('Authorization' => $auth);
187 199
     }
188 200
 
201
+    /**
202
+     * @param string $method
203
+     * @param null|string $contentType
204
+     */
189 205
     public function RtcToken($method, $url, $contentType, $body)
190 206
     {
191 207
         $url = parse_url($url);
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Qiniu;
3 3
 
4
-use Qiniu\Zone;
5
-
6 4
 final class Auth
7 5
 {
8 6
     public $accessKey;
Please login to merge, or discard this patch.
src/Qiniu/Rtc/AppClient.php 2 patches
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -189,6 +189,9 @@  discard block
 block discarded – undo
189 189
         return $this->auth->accessKey . ":" . $encodedSign . ":" . $encodedappAccess;
190 190
     }
191 191
 
192
+    /**
193
+     * @param string $url
194
+     */
192 195
     private function get($url)
193 196
     {
194 197
         $cType = null;
@@ -204,6 +207,9 @@  discard block
 block discarded – undo
204 207
         return array($ret->json(), null);
205 208
     }
206 209
 
210
+    /**
211
+     * @param string $url
212
+     */
207 213
     private function delete($url)
208 214
     {
209 215
         $cType = 'application/json';
@@ -219,6 +225,10 @@  discard block
 block discarded – undo
219 225
         return array($ret->json(), null);
220 226
     }
221 227
 
228
+    /**
229
+     * @param string $url
230
+     * @param string $body
231
+     */
222 232
     private function post($url, $body)
223 233
     {
224 234
         $cType = 'application/json';
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Qiniu\Rtc;
3 3
 
4
-use Qiniu\Zone;
4
+use Qiniu\Auth;
5
+use Qiniu\Config;
5 6
 use Qiniu\Http\Client;
6 7
 use Qiniu\Http\Error;
7
-use Qiniu\Config;
8
-use Qiniu\Auth;
9 8
 
10 9
 class AppClient
11 10
 {
Please login to merge, or discard this patch.