Passed
Pull Request — master (#918)
by Songda
02:17
created
Category
src/Shortcut/Unipay/ScanShortcut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function getPlugins(array $params): array
19 19
     {
20
-        $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins';
20
+        $typeMethod = Str::camel($params['_action'] ?? 'default') . 'Plugins';
21 21
 
22 22
         if (method_exists($this, $typeMethod)) {
23 23
             return $this->{$typeMethod}();
Please login to merge, or discard this patch.
src/Shortcut/Unipay/PosShortcut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function getPlugins(array $params): array
19 19
     {
20
-        $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins';
20
+        $typeMethod = Str::camel($params['_action'] ?? 'default') . 'Plugins';
21 21
 
22 22
         if (method_exists($this, $typeMethod)) {
23 23
             return $this->{$typeMethod}();
Please login to merge, or discard this patch.
src/Shortcut/Unipay/RefundShortcut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function getPlugins(array $params): array
19 19
     {
20
-        $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins';
20
+        $typeMethod = Str::camel($params['_action'] ?? 'default') . 'Plugins';
21 21
 
22 22
         if (method_exists($this, $typeMethod)) {
23 23
             return $this->{$typeMethod}();
Please login to merge, or discard this patch.
src/Shortcut/Unipay/CancelShortcut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function getPlugins(array $params): array
19 19
     {
20
-        $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins';
20
+        $typeMethod = Str::camel($params['_action'] ?? 'default') . 'Plugins';
21 21
 
22 22
         if (method_exists($this, $typeMethod)) {
23 23
             return $this->{$typeMethod}();
Please login to merge, or discard this patch.
src/Pay.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
         HttpServiceProvider::class,
72 72
     ];
73 73
 
74
-    private static null|Closure|ContainerInterface $container = null;
74
+    private static null | Closure | ContainerInterface $container = null;
75 75
 
76 76
     /**
77 77
      * @throws ContainerException
78 78
      */
79
-    private function __construct(array $config, Closure|ContainerInterface $container = null)
79
+    private function __construct(array $config, Closure | ContainerInterface $container = null)
80 80
     {
81 81
         $this->registerServices($config, $container);
82 82
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * @throws ContainerException
104 104
      */
105
-    public static function config(array $config = [], Closure|ContainerInterface $container = null): bool
105
+    public static function config(array $config = [], Closure | ContainerInterface $container = null): bool
106 106
     {
107 107
         if (self::hasContainer() && !($config['_force'] ?? false)) {
108 108
             return false;
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         } catch (ContainerNotFoundException $e) {
138 138
             throw $e;
139 139
         } catch (Throwable $e) {
140
-            throw new ContainerException('容器异常: '.$e->getMessage());
140
+            throw new ContainerException('容器异常: ' . $e->getMessage());
141 141
         }
142 142
 
143 143
         throw new ContainerException('容器异常: 当前容器类型不支持 `set` 方法');
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         } catch (ContainerNotFoundException $e) {
160 160
             throw $e;
161 161
         } catch (Throwable $e) {
162
-            throw new ContainerException('容器异常: '.$e->getMessage());
162
+            throw new ContainerException('容器异常: ' . $e->getMessage());
163 163
         }
164 164
 
165 165
         $parameters = array_values($parameters);
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
         try {
177 177
             return Pay::getContainer()->get($service);
178 178
         } catch (NotFoundExceptionInterface $e) {
179
-            throw new ServiceNotFoundException('服务未找到: '.$e->getMessage());
179
+            throw new ServiceNotFoundException('服务未找到: ' . $e->getMessage());
180 180
         } catch (ContainerNotFoundException $e) {
181 181
             throw $e;
182 182
         } catch (Throwable $e) {
183
-            throw new ContainerException('容器异常: '.$e->getMessage());
183
+            throw new ContainerException('容器异常: ' . $e->getMessage());
184 184
         }
185 185
     }
186 186
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         return Pay::getContainer()->has($service);
193 193
     }
194 194
 
195
-    public static function setContainer(null|Closure|ContainerInterface $container): void
195
+    public static function setContainer(null | Closure | ContainerInterface $container): void
196 196
     {
197 197
         self::$container = $container;
198 198
     }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     /**
239 239
      * @throws ContainerException
240 240
      */
241
-    private function registerServices(array $config, Closure|ContainerInterface $container = null): void
241
+    private function registerServices(array $config, Closure | ContainerInterface $container = null): void
242 242
     {
243 243
         foreach (array_merge($this->coreService, $this->service) as $service) {
244 244
             self::registerService($service, ContainerServiceProvider::class == $service ? $container : $config);
Please login to merge, or discard this patch.
src/Shortcut/Wechat/QueryShortcut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             return $this->combinePlugins();
41 41
         }
42 42
 
43
-        $action = Str::camel($params['_action'] ?? 'default').'Plugins';
43
+        $action = Str::camel($params['_action'] ?? 'default') . 'Plugins';
44 44
 
45 45
         if (method_exists($this, $action)) {
46 46
             return $this->{$action}();
Please login to merge, or discard this patch.
src/Shortcut/Wechat/RefundShortcut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function getPlugins(array $params): array
31 31
     {
32
-        $action = Str::camel($params['_action'] ?? 'default').'Plugins';
32
+        $action = Str::camel($params['_action'] ?? 'default') . 'Plugins';
33 33
 
34 34
         if (method_exists($this, $action)) {
35 35
             return $this->{$action}();
Please login to merge, or discard this patch.
src/Contract/ProviderInterface.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@
 block discarded – undo
20 20
      * @throws InvalidParamsException
21 21
      * @throws ServiceNotFoundException
22 22
      */
23
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket;
23
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket;
24 24
 
25
-    public function query(array $order): Collection|Rocket;
25
+    public function query(array $order): Collection | Rocket;
26 26
 
27
-    public function cancel(array $order): Collection|Rocket;
27
+    public function cancel(array $order): Collection | Rocket;
28 28
 
29
-    public function close(array $order): Collection|Rocket;
29
+    public function close(array $order): Collection | Rocket;
30 30
 
31
-    public function refund(array $order): Collection|Rocket;
31
+    public function refund(array $order): Collection | Rocket;
32 32
 
33
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket;
33
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | Rocket;
34 34
 
35 35
     public function success(): ResponseInterface;
36 36
 }
Please login to merge, or discard this patch.
src/Rocket.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 
33 33
     private string $direction = DirectionInterface::class;
34 34
 
35
-    private null|Collection|MessageInterface $destination = null;
35
+    private null | Collection | MessageInterface $destination = null;
36 36
 
37
-    private null|RequestInterface|ResponseInterface $destinationOrigin = null;
37
+    private null | RequestInterface | ResponseInterface $destinationOrigin = null;
38 38
 
39 39
     public function getRadar(): ?RequestInterface
40 40
     {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         return $this->payload;
73 73
     }
74 74
 
75
-    public function setPayload(null|array|Collection $payload): Rocket
75
+    public function setPayload(null | array | Collection $payload): Rocket
76 76
     {
77 77
         if (is_array($payload)) {
78 78
             $payload = new Collection($payload);
@@ -118,24 +118,24 @@  discard block
 block discarded – undo
118 118
         return $this;
119 119
     }
120 120
 
121
-    public function getDestination(): null|Collection|MessageInterface
121
+    public function getDestination(): null | Collection | MessageInterface
122 122
     {
123 123
         return $this->destination;
124 124
     }
125 125
 
126
-    public function setDestination(null|Collection|MessageInterface $destination): Rocket
126
+    public function setDestination(null | Collection | MessageInterface $destination): Rocket
127 127
     {
128 128
         $this->destination = $destination;
129 129
 
130 130
         return $this;
131 131
     }
132 132
 
133
-    public function getDestinationOrigin(): null|RequestInterface|ResponseInterface
133
+    public function getDestinationOrigin(): null | RequestInterface | ResponseInterface
134 134
     {
135 135
         return $this->destinationOrigin;
136 136
     }
137 137
 
138
-    public function setDestinationOrigin(null|RequestInterface|ResponseInterface $destinationOrigin): Rocket
138
+    public function setDestinationOrigin(null | RequestInterface | ResponseInterface $destinationOrigin): Rocket
139 139
     {
140 140
         $this->destinationOrigin = $destinationOrigin;
141 141
 
Please login to merge, or discard this patch.