Test Failed
Branch master (ef2848)
by ma
03:43
created
src/Factory.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
      * @return mixed
20 20
      * @throws Exception
21 21
      */
22
-    public static function init($gateway, $config=[])
22
+    public static function init($gateway, $config = [])
23 23
     {
24 24
         $gateway = StringTool::uFirst($gateway);
25 25
         $class = __NAMESPACE__ . '\\Provider\\' . $gateway;
26 26
         if (class_exists($class)) {
27
-            if(empty(self::$config)) self::config($config);
27
+            if (empty(self::$config)) self::config($config);
28 28
             $objcet = new $class(self::$config);
29 29
             return $objcet;
30 30
         } else {
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public static function config($config)
40 40
     {
41
-        $configFile = CHINAUMS_ROOT_PATH."/config/chinaums.php";
41
+        $configFile = CHINAUMS_ROOT_PATH . "/config/chinaums.php";
42 42
         if (!file_exists($configFile)) {
43 43
             return false;
44 44
         }
45 45
         $baseConfig = require $configFile;
46
-        self::$config = array_replace_recursive($baseConfig,$config);
46
+        self::$config = array_replace_recursive($baseConfig, $config);
47 47
     }
48 48
 
49 49
     /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @return mixed
53 53
      * @throws Exception
54 54
      */
55
-    public static function __callStatic($gateway, $config=[])
55
+    public static function __callStatic($gateway, $config = [])
56 56
     {
57 57
         return self::init($gateway, ...$config);
58 58
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
         $gateway = StringTool::uFirst($gateway);
25 25
         $class = __NAMESPACE__ . '\\Provider\\' . $gateway;
26 26
         if (class_exists($class)) {
27
-            if(empty(self::$config)) self::config($config);
27
+            if(empty(self::$config)) {
28
+                self::config($config);
29
+            }
28 30
             $objcet = new $class(self::$config);
29 31
             return $objcet;
30 32
         } else {
Please login to merge, or discard this patch.
src/Provider/BaseProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
     public function callback($contents)
48 48
     {
49
-        $params = array_map(function ($value) {
49
+        $params = array_map(function($value) {
50 50
             return urldecode($value);
51 51
         }, $contents);
52 52
         $md5Key = $this->config['md5key'];
Please login to merge, or discard this patch.
src/Provider/Contract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function __call(string $shortcut, array $params)
28 28
     {
29
-        $class = '\\tinymeng\\Chinaums\\Service\\'.__CLASS__.'\\' . Str::studly($shortcut);
29
+        $class = '\\tinymeng\\Chinaums\\Service\\' . __CLASS__ . '\\' . Str::studly($shortcut);
30 30
         $objcet = new $class();
31 31
         $objcet->setConfig($this->config);
32 32
         return $objcet;
Please login to merge, or discard this patch.
src/Service/Contract/NmrsDocChange.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
      * 必传的值
25 25
      * @var array
26 26
      */
27
-    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date', 'request_seq','merNo','pic_list'];
27
+    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date', 'request_seq', 'merNo', 'pic_list'];
28 28
 
29 29
 }
Please login to merge, or discard this patch.
src/Service/Contract/AgreementSign.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         try {
39 39
             $this->validate();
40 40
             $data = $this->body;
41
-            $gateway  = $this->config['gateway'] . $this->api;
41
+            $gateway = $this->config['gateway'] . $this->api;
42 42
             $data = json_encode($data);
43 43
             $sign = hash('sha256', $data);
44 44
             $method = $this->method;
Please login to merge, or discard this patch.
src/Service/Contract/AlterQry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
      * 必传的值
25 25
      * @var array
26 26
      */
27
-    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date', 'request_seq','ums_reg_id'];
27
+    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date', 'request_seq', 'ums_reg_id'];
28 28
 
29 29
 }
Please login to merge, or discard this patch.
src/Service/Contract/ComplexAlterAcctinfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
      * 必传的值
25 25
      * @var array
26 26
      */
27
-    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date','request_seq','mer_no','alter_bank_acct_no','alter_bank_no','pic_list'];
27
+    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date', 'request_seq', 'mer_no', 'alter_bank_acct_no', 'alter_bank_no', 'pic_list'];
28 28
 }
Please login to merge, or discard this patch.
src/Service/Contract/NmrsCertChangeSign.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
      * 必传的值
25 25
      * @var array
26 26
      */
27
-    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date', 'request_seq','ums_reg_id'];
27
+    protected $require = ['service', 'accesser_id', 'sign_type', 'request_date', 'request_seq', 'ums_reg_id'];
28 28
 
29 29
 }
Please login to merge, or discard this patch.
src/Service/Contract/StoreChangeSign.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         try {
44 44
             $this->validate();
45 45
             $data = $this->body;
46
-            $gateway  = $this->config['gateway'] . $this->api;
46
+            $gateway = $this->config['gateway'] . $this->api;
47 47
             $data = json_encode($data);
48 48
             $sign = hash('sha256', $data);
49 49
             $method = $this->method;
Please login to merge, or discard this patch.