Completed
Branch master (aa4fb7)
by Tian
02:37
created
src/Utils/Code/Pkcs7Encoder.php 2 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
     /**
17 17
      * 对需要加密的明文进行填充补位
18 18
      *
19
-     * @param $text 需要进行填充补位操作的明文
19
+     * @param string $text 需要进行填充补位操作的明文
20 20
      *
21
-     * @return 补齐明文字符串
21
+     * @return string
22 22
      */
23 23
     public function encode($text)
24 24
     {
@@ -43,8 +43,9 @@  discard block
 block discarded – undo
43 43
      * 对解密后的明文进行补位删除
44 44
      *
45 45
      * @param decrypted 解密后的明文
46
+     * @param string $text
46 47
      *
47
-     * @return 删除填充补位后的明文
48
+     * @return string
48 49
      */
49 50
     public function decode($text)
50 51
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Wechat\Utils\Code;
4 4
 
5
-use Wechat\Utils\Code\ErrorCode;
6
-
7 5
 /**
8 6
  * PKCS7Encoder class
9 7
  *
Please login to merge, or discard this patch.
src/Utils/Code/Prpcrypt.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Wechat\Utils\Code;
4 4
 
5 5
 use Wechat\Utils\Code\ErrorCode;
6
-use Wechat\Utils\Code\Pkcs7Encoder;
7 6
 
8 7
 /**
9 8
  * Prpcrypt class
Please login to merge, or discard this patch.
src/Utils/Code/Sha1.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      * @param string $token     票据
18 18
      * @param string $timestamp 时间戳
19 19
      * @param string $nonce     随机字符串
20
-     * @param string $encrypt   密文消息
20
+     * @param string $encrypt_msg   密文消息
21 21
      */
22 22
     public function getSHA1($token, $timestamp, $nonce, $encrypt_msg)
23 23
     {
Please login to merge, or discard this patch.
src/Utils/Code/WXBizMsgCrypt.php 2 patches
Doc Comments   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * 构造函数
28 28
      *
29
-     * @param $token          string 公众平台上,开发者设置的token
30
-     * @param $encodingAesKey string 公众平台上,开发者设置的EncodingAESKey
31
-     * @param $appId          string 公众平台的appId
29
+     * @param string $token          string 公众平台上,开发者设置的token
30
+     * @param string $encodingAesKey string 公众平台上,开发者设置的EncodingAESKey
31
+     * @param string $appId          string 公众平台的appId
32 32
      */
33 33
     public function __construct($token, $encodingAesKey, $appId)
34 34
     {
@@ -46,10 +46,11 @@  discard block
 block discarded – undo
46 46
      * </ol>
47 47
      *
48 48
      * @param $replyMsg     string 公众平台待回复用户的消息,xml格式的字符串
49
-     * @param $timeStamp    string 时间戳,可以自己生成,也可以用URL参数的timestamp
50
-     * @param $nonce        string 随机串,可以自己生成,也可以用URL参数的nonce
49
+     * @param integer $timeStamp    string 时间戳,可以自己生成,也可以用URL参数的timestamp
50
+     * @param string $nonce        string 随机串,可以自己生成,也可以用URL参数的nonce
51 51
      * @param &$encryptMsg  string 加密后的可以直接回复用户的密文,包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串,
52 52
      *                      当return返回0时有效
53
+     * @param string $encryptMsg
53 54
      *
54 55
      * @return int 成功0,失败返回对应的错误码
55 56
      */
@@ -99,6 +100,7 @@  discard block
 block discarded – undo
99 100
      * @param $nonce        string 随机串,对应URL参数的nonce
100 101
      * @param $postData     string 密文,对应POST请求的数据
101 102
      * @param &$msg         string 解密后的原文,当return返回0时有效
103
+     * @param string $msg
102 104
      *
103 105
      * @return int 成功0,失败返回对应的错误码
104 106
      */
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,6 @@
 block discarded – undo
7 7
  * @copyright Copyright (c) 1998-2014 Tencent Inc.
8 8
  */
9 9
 
10
-use Wechat\Utils\Code\Sha1;
11
-use Wechat\Utils\Code\Xmlparse;
12
-use Wechat\Utils\Code\Pkcs7Encoder;
13 10
 use Wechat\Utils\Code\ErrorCode;
14 11
 use Wechat\Utils\Code\Prpcrypt;
15 12
 
Please login to merge, or discard this patch.
src/Utils/Url.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
         } else {
30 30
             $host = $_SERVER['HTTP_HOST'];
31 31
         }
32
-        return $protocol.$host.$_SERVER['REQUEST_URI'];
32
+        return $protocol . $host . $_SERVER['REQUEST_URI'];
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
src/Utils/JSON.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
         return version_compare(PHP_VERSION, '5.4.0', '>=')
50 50
             ? $data
51
-            : preg_replace_callback("/\\\\u([0-9a-f]{2})([0-9a-f]{2})/iu", function ($pipe) {
51
+            : preg_replace_callback("/\\\\u([0-9a-f]{2})([0-9a-f]{2})/iu", function($pipe) {
52 52
                 return iconv(
53 53
                     strncasecmp(PHP_OS, 'WIN', 3) ? 'UCS-2BE' : 'UCS-2',
54 54
                     'UTF-8',
Please login to merge, or discard this patch.