Passed
Push — master ( fba0bb...d8222d )
by Songda
02:36
created
src/Provider/Alipay.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      * @throws InvalidParamsException
53 53
      * @throws ServiceNotFoundException
54 54
      */
55
-    public function __call(string $shortcut, array $params): null|Collection|MessageInterface|Rocket
55
+    public function __call(string $shortcut, array $params): null | Collection | MessageInterface | Rocket
56 56
     {
57
-        $plugin = '\\Yansongda\\Pay\\Shortcut\\Alipay\\'.Str::studly($shortcut).'Shortcut';
57
+        $plugin = '\\Yansongda\\Pay\\Shortcut\\Alipay\\' . Str::studly($shortcut) . 'Shortcut';
58 58
 
59 59
         return Artful::shortcut($plugin, ...$params);
60 60
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @throws ContainerException
64 64
      * @throws InvalidParamsException
65 65
      */
66
-    public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket
66
+    public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket
67 67
     {
68 68
         return Artful::artful($plugins, $params);
69 69
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @throws InvalidParamsException
74 74
      * @throws ServiceNotFoundException
75 75
      */
76
-    public function query(array $order): Collection|Rocket
76
+    public function query(array $order): Collection | Rocket
77 77
     {
78 78
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
79 79
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @throws InvalidParamsException
86 86
      * @throws ServiceNotFoundException
87 87
      */
88
-    public function cancel(array $order): Collection|Rocket
88
+    public function cancel(array $order): Collection | Rocket
89 89
     {
90 90
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
91 91
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @throws InvalidParamsException
98 98
      * @throws ServiceNotFoundException
99 99
      */
100
-    public function close(array $order): Collection|Rocket
100
+    public function close(array $order): Collection | Rocket
101 101
     {
102 102
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
103 103
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @throws InvalidParamsException
110 110
      * @throws ServiceNotFoundException
111 111
      */
112
-    public function refund(array $order): Collection|Rocket
112
+    public function refund(array $order): Collection | Rocket
113 113
     {
114 114
         Event::dispatch(new MethodCalled('alipay', __METHOD__, $order, null));
115 115
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      * @throws ContainerException
121 121
      * @throws InvalidParamsException
122 122
      */
123
-    public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection
123
+    public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection
124 124
     {
125 125
         $request = $this->getCallbackParams($contents);
126 126
 
@@ -143,15 +143,14 @@  discard block
 block discarded – undo
143 143
         );
144 144
     }
145 145
 
146
-    protected function getCallbackParams(null|array|ServerRequestInterface $contents = null): Collection
146
+    protected function getCallbackParams(null | array | ServerRequestInterface $contents = null): Collection
147 147
     {
148 148
         if (is_array($contents)) {
149 149
             return Collection::wrap($contents);
150 150
         }
151 151
 
152 152
         if ($contents instanceof ServerRequestInterface) {
153
-            return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() :
154
-                $contents->getParsedBody());
153
+            return Collection::wrap('GET' === $contents->getMethod() ? $contents->getQueryParams() : $contents->getParsedBody());
155 154
         }
156 155
 
157 156
         $request = ServerRequest::fromGlobals();
Please login to merge, or discard this patch.
src/Pay.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     /**
61 61
      * @throws ContainerException
62 62
      */
63
-    public static function config(array $config = [], null|Closure|ContainerInterface $container = null): bool
63
+    public static function config(array $config = [], null | Closure | ContainerInterface $container = null): bool
64 64
     {
65 65
         $result = Artful::config($config, $container);
66 66
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         return Artful::get($service);
89 89
     }
90 90
 
91
-    public static function setContainer(null|Closure|ContainerInterface $container): void
91
+    public static function setContainer(null | Closure | ContainerInterface $container): void
92 92
     {
93 93
         Artful::setContainer($container);
94 94
     }
Please login to merge, or discard this patch.