Passed
Push — master ( a6a7ae...bf6fd0 )
by i
03:53
created
src/Alipay/AbstractAlipay.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         $required = ['out_trade_no', 'total_amount', 'subject'];
25 25
         foreach ($required as $key => $item) {
26
-            if (! array_key_exists($item, $order)) {
26
+            if (!array_key_exists($item, $order)) {
27 27
                 throw new \InvalidArgumentException("The {$item} field is required");
28 28
             }
29 29
         }
Please login to merge, or discard this patch.
src/Alipay/Traits/RequestTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,14 +27,14 @@
 block discarded – undo
27 27
     public function send(array $array, string $key) : Collection
28 28
     {
29 29
         $method = Arr::get($array, 'method');
30
-        $method = str_replace('.', '_', $method) . '_response';
30
+        $method = str_replace('.', '_', $method).'_response';
31 31
         $result = $this->post('', $array);
32 32
         $result = mb_convert_encoding($result, 'UTF-8', 'GB2312');
33 33
         $result = json_decode($result, true);
34 34
 
35 35
         $data = Arr::get($result, $method);
36 36
         $sign = Arr::get($result, 'sign');
37
-        if (! self::verifySign($data, $key, true, $sign)) {
37
+        if (!self::verifySign($data, $key, true, $sign)) {
38 38
             throw new InvalidSignException(
39 39
                 'Invalid Alipay [signature] verify.',
40 40
                 3
Please login to merge, or discard this patch.
src/Alipay/Traits/SecurityTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
         $string = '';
59 59
         foreach ($array as $key => $val) {
60 60
             if ($isVerify && $key !== 'sign' && $key !== 'sign_type') {
61
-                $string .= $key . '=' . $val . '&';
61
+                $string .= $key.'='.$val.'&';
62 62
             }
63
-            if (! $isVerify
63
+            if (!$isVerify
64 64
                 && $val !== ''
65 65
                 && null !== $val
66 66
                 && $key !== 'sign'
67 67
                 && 0 !== strpos($val, '@')
68 68
             ) {
69
-                $string .= $key . '=' . $val . '&';
69
+                $string .= $key.'='.$val.'&';
70 70
             }
71 71
         }
72 72
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $data = [];
135 135
         foreach ($array as $key => $val) {
136 136
             if (\is_array($val)) {
137
-                $data[$key] = self::toEncoding((array)$val, $to, $from);
137
+                $data[$key] = self::toEncoding((array) $val, $to, $from);
138 138
             } else {
139 139
                 $data[$key] = mb_convert_encoding($val, $to, $from);
140 140
             }
Please login to merge, or discard this patch.