@@ -117,6 +117,9 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | |
120 | + /** |
|
121 | + * @param string $url |
|
122 | + */ |
|
120 | 123 | protected function curl($url, $postFields = null) { |
121 | 124 | $ch = curl_init(); |
122 | 125 | curl_setopt($ch, CURLOPT_URL, $url); |
@@ -187,6 +190,10 @@ discard block |
||
187 | 190 | } |
188 | 191 | |
189 | 192 | |
193 | + /** |
|
194 | + * @param string $requestUrl |
|
195 | + * @param string $errorCode |
|
196 | + */ |
|
190 | 197 | protected function logCommunicationError($apiName, $requestUrl, $errorCode, $responseTxt) { |
191 | 198 | $localIp = isset ($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "CLI"; |
192 | 199 | $logger = new LtLogger; |
@@ -338,7 +345,7 @@ discard block |
||
338 | 345 | /** |
339 | 346 | * 建立请求,以表单HTML形式构造(默认) |
340 | 347 | * @param $para_temp 请求参数数组 |
341 | - * @return 提交表单HTML文本 |
|
348 | + * @return string |
|
342 | 349 | */ |
343 | 350 | protected function buildRequestForm($para_temp) { |
344 | 351 | |
@@ -700,6 +707,9 @@ discard block |
||
700 | 707 | return $strnull; |
701 | 708 | } |
702 | 709 | |
710 | + /** |
|
711 | + * @param integer $subnum |
|
712 | + */ |
|
703 | 713 | function splitCN($cont, $n = 0, $subnum, $charset) { |
704 | 714 | //$len = strlen($cont) / 3; |
705 | 715 | $arrr = array(); |
@@ -726,6 +736,9 @@ discard block |
||
726 | 736 | return $slice; |
727 | 737 | } |
728 | 738 | |
739 | + /** |
|
740 | + * @param string $format |
|
741 | + */ |
|
729 | 742 | function parserResponseSubCode($request, $responseContent, $respObject, $format) { |
730 | 743 | |
731 | 744 | if ("json" == $format) { |
@@ -802,6 +815,10 @@ discard block |
||
802 | 815 | |
803 | 816 | } |
804 | 817 | |
818 | + /** |
|
819 | + * @param string $nodeName |
|
820 | + * @param integer $nodeIndex |
|
821 | + */ |
|
805 | 822 | function parserJSONSource($responseContent, $nodeName, $nodeIndex) { |
806 | 823 | $signDataStartIndex = $nodeIndex + strlen($nodeName) + 2; |
807 | 824 | $signIndex = strpos($responseContent, "\"" . $this->SIGN_NODE_NAME . "\""); |
@@ -863,6 +880,10 @@ discard block |
||
863 | 880 | |
864 | 881 | } |
865 | 882 | |
883 | + /** |
|
884 | + * @param string $nodeName |
|
885 | + * @param integer $nodeIndex |
|
886 | + */ |
|
866 | 887 | function parserXMLSource($responseContent, $nodeName, $nodeIndex) { |
867 | 888 | $signDataStartIndex = $nodeIndex + strlen($nodeName) + 1; |
868 | 889 | $signIndex = strpos($responseContent, "<" . $this->SIGN_NODE_NAME . ">"); |
@@ -908,7 +929,7 @@ discard block |
||
908 | 929 | /** |
909 | 930 | * 验签 |
910 | 931 | * @param $request |
911 | - * @param $signData |
|
932 | + * @param SignData|null $signData |
|
912 | 933 | * @param $resp |
913 | 934 | * @param $respObject |
914 | 935 | * @throws Exception |
@@ -1004,6 +1025,10 @@ discard block |
||
1004 | 1025 | } |
1005 | 1026 | |
1006 | 1027 | |
1028 | + /** |
|
1029 | + * @param string $nodeName |
|
1030 | + * @param integer $nodeIndex |
|
1031 | + */ |
|
1007 | 1032 | private function parserEncryptJSONItem($responseContent, $nodeName, $nodeIndex) { |
1008 | 1033 | $signDataStartIndex = $nodeIndex + strlen($nodeName) + 2; |
1009 | 1034 | $signIndex = strpos($responseContent, "\"" . $this->SIGN_NODE_NAME . "\""); |
@@ -1071,6 +1096,10 @@ discard block |
||
1071 | 1096 | |
1072 | 1097 | } |
1073 | 1098 | |
1099 | + /** |
|
1100 | + * @param string $nodeName |
|
1101 | + * @param integer $nodeIndex |
|
1102 | + */ |
|
1074 | 1103 | private function parserEncryptXMLItem($responseContent, $nodeName, $nodeIndex) { |
1075 | 1104 | |
1076 | 1105 | $signDataStartIndex = $nodeIndex + strlen($nodeName) + 1; |
@@ -162,7 +162,7 @@ |
||
162 | 162 | |
163 | 163 | /** |
164 | 164 | * 格式化返回数据 |
165 | - * @param $response |
|
165 | + * @param AlipayF2FPayResult $response |
|
166 | 166 | * @author kaylv <[email protected]> |
167 | 167 | * @return array|Collection|string |
168 | 168 | */ |
@@ -4,12 +4,10 @@ |
||
4 | 4 | |
5 | 5 | use GuzzleHttp\MessageFormatter; |
6 | 6 | use GuzzleHttp\Middleware; |
7 | -use Kaylyu\Alipay\F2fpay\Base\Model\Result\AlipayF2FPayResult; |
|
8 | 7 | use Kaylyu\Alipay\Kernel\Exceptions\Exception; |
9 | 8 | use Kaylyu\Alipay\Kernel\ServiceContainer; |
10 | 9 | use Kaylyu\Alipay\Kernel\Support\Collection; |
11 | 10 | use Kaylyu\Alipay\Kernel\Traits\HasHttpRequests; |
12 | -use Psr\Http\Message\ResponseInterface; |
|
13 | 11 | |
14 | 12 | /** |
15 | 13 | * Class BaseClient. |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Closure; |
6 | 6 | use Exception; |
7 | 7 | use Kaylyu\Alipay\F2fpay\Kernel\AopClient; |
8 | -use Kaylyu\Alipay\Kernel\Support\Arr; |
|
9 | 8 | |
10 | 9 | class Paid extends Handler |
11 | 10 | { |
@@ -131,7 +131,7 @@ |
||
131 | 131 | * @param bool $returnRaw |
132 | 132 | * @param array $forceArrayKeys |
133 | 133 | * |
134 | - * @return \Psr\Http\Message\ResponseInterface|\Kaylyu\Alipay\Kernel\Support\Collection|array|object|string |
|
134 | + * @return \Psr\Http\Message\ResponseInterface |
|
135 | 135 | * |
136 | 136 | * @throws \Kaylyu\Alipay\Kernel\Exceptions\InvalidConfigException |
137 | 137 | * @throws \Kaylyu\Alipay\Kernel\Exceptions\Exception |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * |
82 | 82 | * @param string|null $channel |
83 | 83 | * |
84 | - * @return mixed |
|
84 | + * @return LoggerInterface |
|
85 | 85 | */ |
86 | 86 | public function channel($channel = null) |
87 | 87 | { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @param string|null $driver |
95 | 95 | * |
96 | - * @return mixed |
|
96 | + * @return LoggerInterface |
|
97 | 97 | */ |
98 | 98 | public function driver($driver = null) |
99 | 99 | { |
@@ -284,9 +284,9 @@ discard block |
||
284 | 284 | /** |
285 | 285 | * Prepare the handlers for usage by Monolog. |
286 | 286 | * |
287 | - * @param array $handlers |
|
287 | + * @param StreamHandler[] $handlers |
|
288 | 288 | * |
289 | - * @return array |
|
289 | + * @return HandlerInterface[] |
|
290 | 290 | */ |
291 | 291 | protected function prepareHandlers(array $handlers) |
292 | 292 | { |
@@ -203,7 +203,7 @@ |
||
203 | 203 | /** |
204 | 204 | * Get guzzle handler. |
205 | 205 | * |
206 | - * @return callable |
|
206 | + * @return null|callable |
|
207 | 207 | */ |
208 | 208 | protected function getGuzzleHandler() |
209 | 209 | { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @param \Closure|EventHandlerInterface|string $handler |
30 | - * @param \Closure|EventHandlerInterface|string $condition |
|
30 | + * @param string $condition |
|
31 | 31 | * |
32 | 32 | * @return \Kaylyu\Alipay\Kernel\Clauses\Clause |
33 | 33 | * |