Completed
Push — master ( bf6fd0...fe0998 )
by i
04:47
created
src/Wechat/WapPayment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         if (null === $returnUrl) {
28 28
             $url = $object->url;
29 29
         } else {
30
-            $url = $object->url . '&redirect_url=' . urlencode($returnUrl);
30
+            $url = $object->url.'&redirect_url='.urlencode($returnUrl);
31 31
         }
32 32
         echo $url;
33 33
     }
Please login to merge, or discard this patch.
src/Wechat/Traits/SecurityTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         }
29 29
 
30 30
         ksort($array);
31
-        $string = md5(self::getSignContent($array) . '&key=' . $key);
31
+        $string = md5(self::getSignContent($array).'&key='.$key);
32 32
         $string = strtoupper($string);
33 33
 
34 34
         return $string;
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $string = '';
47 47
         foreach ($array as $key => $val) {
48
-            if ($key !== 'sign' && $val !== '' && ! \is_array($val)) {
49
-                $string .= $key . '=' . $val;
48
+            if ($key !== 'sign' && $val !== '' && !\is_array($val)) {
49
+                $string .= $key.'='.$val;
50 50
             }
51 51
         }
52 52
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $data = [];
115 115
         foreach ($array as $key => $val) {
116 116
             if (\is_array($val)) {
117
-                $data[$key] = self::toEncoding((array)$val, $to, $from);
117
+                $data[$key] = self::toEncoding((array) $val, $to, $from);
118 118
             } else {
119 119
                 $data[$key] = mb_convert_encoding($val, $to, $from);
120 120
             }
Please login to merge, or discard this patch.
src/Wechat/Traits/RequestTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         if ($code !== 'SUCCESS') {
39 39
             throw new GatewayException(
40
-                'Wechat API Error: ' . $result['return_msg'],
40
+                'Wechat API Error: '.$result['return_msg'],
41 41
                 20000
42 42
             );
43 43
         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public static function toXml(array $array) : string
119 119
     {
120
-        if (! $array) {
120
+        if (!$array) {
121 121
             throw new \InvalidArgumentException('Invalid [array] argument.', 2);
122 122
         }
123 123
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public static function fromXml(string $xml) : array
144 144
     {
145
-        if (! $xml) {
145
+        if (!$xml) {
146 146
             throw new \InvalidArgumentException('Invalid [xml] argument.', 3);
147 147
         }
148 148
         libxml_disable_entity_loader(true);
Please login to merge, or discard this patch.
src/Wechat/AbstractWechat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $env = $this->config->get('env', 'pro');
48 48
         $key = $this->config->get('key');
49 49
         $payload['sign'] = self::generateSign($payload, $key);
50
-        $gateway = self::getGatewayUrl($env) . $gateway;
50
+        $gateway = self::getGatewayUrl($env).$gateway;
51 51
 
52 52
         return $this->send($gateway, $payload, $key);
53 53
     }
Please login to merge, or discard this patch.
src/Wechat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     public function pay(string $gateway, array $array = [])
84 84
     {
85 85
         $this->payload = array_merge($this->payload, $array);
86
-        $class = \get_class($this) . '\\' . Str::studly($gateway) . 'Payment';
86
+        $class = \get_class($this).'\\'.Str::studly($gateway).'Payment';
87 87
 
88 88
         if (class_exists($class)) {
89 89
             return $this->toPay($class);
Please login to merge, or discard this patch.