Passed
Pull Request — master (#1002)
by
unknown
02:10
created
src/Plugin/Epay/VerifySignaturePlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@
 block discarded – undo
81 81
         if (Str::contains($body, '&-&')) {
82 82
             $beginIndex = strpos($body, '&signType=');
83 83
             $endIndex = strpos($body, '&-&');
84
-            $data = substr($body, 0, $beginIndex).substr($body, $endIndex);
84
+            $data = substr($body, 0, $beginIndex) . substr($body, $endIndex);
85 85
 
86 86
             $signIndex = strpos($body, '&sign=');
87 87
             $signature = substr($body, $signIndex + strlen('&sign='), $endIndex - ($signIndex + strlen('&sign=')));
88
-        } else {
88
+        }else {
89 89
             $result = Arr::wrapQuery($body, true);
90 90
             $result = Collection::wrap($result);
91 91
             $signature = $result->get('sign');
Please login to merge, or discard this patch.
src/Provider/Epay.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function __call($name, $params)
43 43
     {
44
-        $plugin = '\\Yansongda\\Pay\\Shortcut\\Epay\\'.Str::studly($name).'Shortcut';
44
+        $plugin = '\\Yansongda\\Pay\\Shortcut\\Epay\\' . Str::studly($name) . 'Shortcut';
45 45
 
46 46
         return Artful::shortcut($plugin, ...$params);
47 47
     }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @throws ContainerException
51 51
      * @throws InvalidParamsException
52 52
      */
53
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket
53
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket
54 54
     {
55 55
         return Artful::artful($plugins, $params);
56 56
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         );
65 65
     }
66 66
 
67
-    public function cancel($order): Collection|Rocket
67
+    public function cancel($order): Collection | Rocket
68 68
     {
69 69
         $order = is_array($order) ? $order : ['outTradeNo' => $order];
70 70
 
@@ -73,19 +73,19 @@  discard block
 block discarded – undo
73 73
         return $this->__call('cancel', [$order]);
74 74
     }
75 75
 
76
-    public function close($order): Collection|Rocket
76
+    public function close($order): Collection | Rocket
77 77
     {
78 78
         throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, 'Epay does not support close api');
79 79
     }
80 80
 
81
-    public function refund(array $order): Collection|Rocket
81
+    public function refund(array $order): Collection | Rocket
82 82
     {
83 83
         Event::dispatch(new MethodCalled('epay', __METHOD__, $order, null));
84 84
 
85 85
         return $this->__call('refund', [$order]);
86 86
     }
87 87
 
88
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket
88
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | Rocket
89 89
     {
90 90
         $request = $this->getCallbackParams($contents);
91 91
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         );
107 107
     }
108 108
 
109
-    public function query(array $order): Collection|Rocket
109
+    public function query(array $order): Collection | Rocket
110 110
     {
111 111
         $order = is_array($order) ? $order : ['outTradeNo' => $order];
112 112
 
Please login to merge, or discard this patch.