Passed
Push — master ( b979a3...edb5ad )
by ma
03:05
created
example/Wechat/CloseTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 $config = include_once './Config/Config.php';
9 9
 
10 10
 $data = [
11
-    'requestTimestamp' => date("YmdHis", time()),//请求时间
12
-    'merOrderId' => '101720220303143314904287',//商户订单号
13
-    'instMid' => 'MINIDEFAULT',//业务类型 
11
+    'requestTimestamp' => date("YmdHis", time()), //请求时间
12
+    'merOrderId' => '101720220303143314904287', //商户订单号
13
+    'instMid' => 'MINIDEFAULT', //业务类型 
14 14
 ];
15 15
 Factory::config($config);
16 16
 $response = Factory::Wechat()->close($data);
Please login to merge, or discard this patch.
example/Wechat/CallbackTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,5 +10,5 @@
 block discarded – undo
10 10
 $data = [];
11 11
 Factory::config($config);
12 12
 $response = Factory::Wechat()->callback($data);
13
-echo Factory::Wechat()->success().PHP_EOL;
14
-echo 'response:' . (int)$response . PHP_EOL;
13
+echo Factory::Wechat()->success() . PHP_EOL;
14
+echo 'response:' . (int) $response . PHP_EOL;
Please login to merge, or discard this patch.
src/Provider/BaseProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
      * @param array $params
24 24
      * @return mixed
25 25
      */
26
-    public function __call(string $shortcut, array $params=[])
26
+    public function __call(string $shortcut, array $params = [])
27 27
     {
28
-        $class = str_replace('Provider','Service',static::class).'\\' . Str::studly($shortcut);
29
-        if(!class_exists($class)){
28
+        $class = str_replace('Provider', 'Service', static::class) . '\\' . Str::studly($shortcut);
29
+        if (!class_exists($class)) {
30 30
             throw new TException("Chinaums:{$class}类不存在");
31 31
         }
32 32
 
33
-        return new $class($this->config,$params[0]??[]);
33
+        return new $class($this->config, $params[0] ?? []);
34 34
     }
35 35
 
36 36
     /**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function callback($contents)
41 41
     {
42
-        $params = array_map(function ($value) {
42
+        $params = array_map(function($value) {
43 43
             return urldecode($value);
44 44
         }, $contents);
45 45
         $md5Key = $this->config['md5key'];
Please login to merge, or discard this patch.