Completed
Pull Request — master (#293)
by
unknown
22:09
created
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   +38 added lines patch added patch discarded remove patch
@@ -825,42 +825,64 @@  discard block
 block discarded – undo
825 825
         return $scheme . Config::UC_HOST;
826 826
     }
827 827
 
828
+    /**
829
+     * @param string $body
830
+     */
828 831
     private function rsPost($path, $body = null)
829 832
     {
830 833
         $url = $this->getRsHost() . $path;
831 834
         return $this->post($url, $body);
832 835
     }
833 836
 
837
+    /**
838
+     * @param string $path
839
+     */
834 840
     private function apiPost($path, $body = null)
835 841
     {
836 842
         $url = $this->getApiHost() . $path;
837 843
         return $this->post($url, $body);
838 844
     }
839 845
 
846
+    /**
847
+     * @param string $path
848
+     * @param string $body
849
+     */
840 850
     private function ucPost($path, $body = null)
841 851
     {
842 852
         $url = $this->getUcHost() . $path;
843 853
         return $this->post($url, $body);
844 854
     }
845 855
 
856
+    /**
857
+     * @param string $path
858
+     */
846 859
     private function ucGet($path)
847 860
     {
848 861
         $url = $this->getUcHost() . $path;
849 862
         return $this->get($url);
850 863
     }
851 864
 
865
+    /**
866
+     * @param string $path
867
+     */
852 868
     private function apiGet($path)
853 869
     {
854 870
         $url = $this->getApiHost() . $path;
855 871
         return $this->get($url);
856 872
     }
857 873
 
874
+    /**
875
+     * @param string $path
876
+     */
858 877
     private function rsGet($path)
859 878
     {
860 879
         $url = $this->getRsHost() . $path;
861 880
         return $this->get($url);
862 881
     }
863 882
 
883
+    /**
884
+     * @param string $url
885
+     */
864 886
     private function get($url)
865 887
     {
866 888
         $headers = $this->auth->authorization($url);
@@ -871,6 +893,9 @@  discard block
 block discarded – undo
871 893
         return array($ret->json(), null);
872 894
     }
873 895
 
896
+    /**
897
+     * @param string $url
898
+     */
874 899
     private function post($url, $body)
875 900
     {
876 901
         $headers = $this->auth->authorization($url, $body, 'application/x-www-form-urlencoded');
@@ -882,12 +907,19 @@  discard block
 block discarded – undo
882 907
         return array($r, null);
883 908
     }
884 909
 
910
+    /**
911
+     * @param string $path
912
+     * @param string $body
913
+     */
885 914
     private function ucPostV2($path, $body)
886 915
     {
887 916
         $url = $this->getUcHost() . $path;
888 917
         return $this->postV2($url, $body);
889 918
     }
890 919
 
920
+    /**
921
+     * @param string $url
922
+     */
891 923
     private function postV2($url, $body)
892 924
     {
893 925
         $headers = $this->auth->authorizationV2($url, 'POST', $body, 'application/json');
@@ -956,6 +988,9 @@  discard block
 block discarded – undo
956 988
         return $data;
957 989
     }
958 990
 
991
+    /**
992
+     * @param string $operation
993
+     */
959 994
     private static function oneKeyBatch($operation, $bucket, $keys)
960 995
     {
961 996
         $data = array();
@@ -965,6 +1000,9 @@  discard block
 block discarded – undo
965 1000
         return $data;
966 1001
     }
967 1002
 
1003
+    /**
1004
+     * @param string $operation
1005
+     */
968 1006
     private static function twoKeyBatch($operation, $source_bucket, $key_pairs, $target_bucket, $force)
969 1007
     {
970 1008
         if ($target_bucket === null) {
Please login to merge, or discard this patch.
src/Qiniu/Storage/FormUploader.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,10 +13,11 @@
 block discarded – undo
13 13
      * @param $upToken    上传凭证
14 14
      * @param $key        上传文件名
15 15
      * @param $data       上传二进制流
16
-     * @param $config     上传配置
16
+     * @param \Qiniu\Config $config     上传配置
17 17
      * @param $params     自定义变量,规格参考
18 18
      *                    http://developer.qiniu.com/docs/v6/api/overview/up/response/vars.html#xvar
19
-     * @param $mime       上传数据的mimeType
19
+     * @param string $mime       上传数据的mimeType
20
+     * @param boolean $checkCrc
20 21
      *
21 22
      * @return array    包含已上传文件的信息,类似:
22 23
      *                                              [
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/Rtc/AppClient.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Qiniu\Rtc;
3 3
 
4
+use Qiniu\Auth;
5
+use Qiniu\Config;
4 6
 use Qiniu\Http\Client;
5 7
 use Qiniu\Http\Error;
6
-use Qiniu\Config;
7
-use Qiniu\Auth;
8 8
 
9 9
 class AppClient
10 10
 {
Please login to merge, or discard this patch.
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -168,6 +168,9 @@  discard block
 block discarded – undo
168 168
         return $this->auth->signWithData($appAccessString);
169 169
     }
170 170
 
171
+    /**
172
+     * @param string $url
173
+     */
171 174
     private function get($url, $cType = null)
172 175
     {
173 176
         $rtcToken = $this->auth->authorizationV2($url, "GET", null, $cType);
@@ -179,6 +182,9 @@  discard block
 block discarded – undo
179 182
         return array($ret->json(), null);
180 183
     }
181 184
 
185
+    /**
186
+     * @param string $url
187
+     */
182 188
     private function delete($url, $contentType = 'application/json')
183 189
     {
184 190
         $rtcToken = $this->auth->authorizationV2($url, "DELETE", null, $contentType);
@@ -190,6 +196,10 @@  discard block
 block discarded – undo
190 196
         return array($ret->json(), null);
191 197
     }
192 198
 
199
+    /**
200
+     * @param string $url
201
+     * @param string $body
202
+     */
193 203
     private function post($url, $body, $contentType = 'application/json')
194 204
     {
195 205
         $rtcToken = $this->auth->authorizationV2($url, "POST", $body, $contentType);
Please login to merge, or discard this patch.
src/Qiniu/Storage/ArgusManager.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -52,12 +52,18 @@
 block discarded – undo
52 52
         return $scheme . Config::ARGUS_HOST;
53 53
     }
54 54
 
55
+    /**
56
+     * @param string $path
57
+     */
55 58
     private function arPost($path, $body = null)
56 59
     {
57 60
         $url = $this->getArHost() . $path;
58 61
         return $this->post($url, $body);
59 62
     }
60 63
 
64
+    /**
65
+     * @param string $url
66
+     */
61 67
     private function post($url, $body)
62 68
     {
63 69
         $headers = $this->auth->authorizationV2($url, 'POST', $body, 'application/json');
Please login to merge, or discard this patch.
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.
src/Qiniu/Region.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -21,6 +21,10 @@
 block discarded – undo
21 21
     public $iovipHost;
22 22
 
23 23
     //构造一个Region对象
24
+
25
+    /**
26
+     * @param string $iovipHost
27
+     */
24 28
     public function __construct(
25 29
         $srcUpHosts = array(),
26 30
         $cdnUpHosts = array(),
Please login to merge, or discard this patch.