Passed
Push — master ( df334d...db8528 )
by Songda
03:29 queued 01:21
created
src/Plugin/Jsb/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/Jsb.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
      * @throws InvalidParamsException
49 49
      * @throws ServiceNotFoundException
50 50
      */
51
-    public function __call($name, $params): null|Collection|MessageInterface|Rocket
51
+    public function __call($name, $params): null | Collection | MessageInterface | Rocket
52 52
     {
53
-        $plugin = '\Yansongda\Pay\Shortcut\Jsb\\'.Str::studly($name).'Shortcut';
53
+        $plugin = '\Yansongda\Pay\Shortcut\Jsb\\' . Str::studly($name) . 'Shortcut';
54 54
 
55 55
         return Artful::shortcut($plugin, ...$params);
56 56
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @throws ContainerException
60 60
      * @throws InvalidParamsException
61 61
      */
62
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket
62
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket
63 63
     {
64 64
         return Artful::artful($plugins, $params);
65 65
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * @throws InvalidParamsException
78 78
      */
79
-    public function cancel(array $order): Collection|Rocket
79
+    public function cancel(array $order): Collection | Rocket
80 80
     {
81 81
         throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, 'Jsb does not support cancel api');
82 82
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     /**
85 85
      * @throws InvalidParamsException
86 86
      */
87
-    public function close(array $order): Collection|Rocket
87
+    public function close(array $order): Collection | Rocket
88 88
     {
89 89
         throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, 'Jsb does not support close api');
90 90
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @throws InvalidParamsException
95 95
      * @throws ServiceNotFoundException
96 96
      */
97
-    public function refund(array $order): Collection|Rocket
97
+    public function refund(array $order): Collection | Rocket
98 98
     {
99 99
         Event::dispatch(new MethodCalled('jsb', __METHOD__, $order, null));
100 100
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      * @throws ContainerException
106 106
      * @throws InvalidParamsException
107 107
      */
108
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket
108
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | Rocket
109 109
     {
110 110
         $request = $this->getCallbackParams($contents);
111 111
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      * @throws InvalidParamsException
132 132
      * @throws ServiceNotFoundException
133 133
      */
134
-    public function query(array $order): Collection|Rocket
134
+    public function query(array $order): Collection | Rocket
135 135
     {
136 136
         Event::dispatch(new MethodCalled('jsb', __METHOD__, $order, null));
137 137
 
Please login to merge, or discard this patch.