Passed
Push — master ( a000bd...c8eb54 )
by Songda
02:25
created
src/Shortcut/Wechat/CancelShortcut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function getPlugins(array $params): array
34 34
     {
35
-        $method = Str::camel($params['_action'] ?? 'default').'Plugins';
35
+        $method = Str::camel($params['_action'] ?? 'default') . 'Plugins';
36 36
 
37 37
         if (method_exists($this, $method)) {
38 38
             return $this->{$method}();
Please login to merge, or discard this patch.
src/Provider/Wechat.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
      * @throws InvalidParamsException
57 57
      * @throws ServiceNotFoundException
58 58
      */
59
-    public function __call(string $shortcut, array $params): null|Collection|MessageInterface|Rocket
59
+    public function __call(string $shortcut, array $params): null | Collection | MessageInterface | Rocket
60 60
     {
61
-        $plugin = '\Yansongda\Pay\Shortcut\Wechat\\'.Str::studly($shortcut).'Shortcut';
61
+        $plugin = '\Yansongda\Pay\Shortcut\Wechat\\' . Str::studly($shortcut) . 'Shortcut';
62 62
 
63 63
         return Artful::shortcut($plugin, ...$params);
64 64
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @throws ContainerException
68 68
      * @throws InvalidParamsException
69 69
      */
70
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket
70
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket
71 71
     {
72 72
         return Artful::artful($plugins, $params);
73 73
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @throws InvalidParamsException
78 78
      * @throws ServiceNotFoundException
79 79
      */
80
-    public function query(array $order): Collection|Rocket
80
+    public function query(array $order): Collection | Rocket
81 81
     {
82 82
         Event::dispatch(new MethodCalled('wechat', __METHOD__, $order, null));
83 83
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * @throws InvalidParamsException
89 89
      */
90
-    public function cancel(array $order): Collection|Rocket
90
+    public function cancel(array $order): Collection | Rocket
91 91
     {
92 92
         Event::dispatch(new MethodCalled('wechat', __METHOD__, $order, null));
93 93
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * @throws InvalidParamsException
100 100
      * @throws ServiceNotFoundException
101 101
      */
102
-    public function close(array $order): Collection|Rocket
102
+    public function close(array $order): Collection | Rocket
103 103
     {
104 104
         Event::dispatch(new MethodCalled('wechat', __METHOD__, $order, null));
105 105
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @throws InvalidParamsException
114 114
      * @throws ServiceNotFoundException
115 115
      */
116
-    public function refund(array $order): Collection|Rocket
116
+    public function refund(array $order): Collection | Rocket
117 117
     {
118 118
         Event::dispatch(new MethodCalled('wechat', __METHOD__, $order, null));
119 119
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      * @throws ContainerException
125 125
      * @throws InvalidParamsException
126 126
      */
127
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket
127
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | Rocket
128 128
     {
129 129
         $request = $this->getCallbackParams($contents);
130 130
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         );
155 155
     }
156 156
 
157
-    protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): ServerRequestInterface
157
+    protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): ServerRequestInterface
158 158
     {
159 159
         if (is_array($contents) && isset($contents['body'], $contents['headers'])) {
160 160
             return new ServerRequest('POST', 'http://localhost', $contents['headers'], $contents['body']);
Please login to merge, or discard this patch.