Completed
Pull Request — master (#1556)
by wannanbigpig
14:01
created
src/Kernel/Support/Helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname());
50 50
     }
51 51
 
52
-    return filter_var($ip, FILTER_VALIDATE_IP) ? : '127.0.0.1';
52
+    return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1';
53 53
 }
54 54
 
55 55
 /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname());
69 69
     }
70 70
 
71
-    return filter_var($ip, FILTER_VALIDATE_IP) ? : '127.0.0.1';
71
+    return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1';
72 72
 }
73 73
 
74 74
 /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $protocol = 'https://';
87 87
     }
88 88
 
89
-    return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
89
+    return $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
90 90
 }
91 91
 
92 92
 /**
Please login to merge, or discard this patch.
src/MicroMerchant/MerchantConfig/Client.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
     public function addPayAccreditDirectory(string $jsapi_path, string $appid = '', string $sub_mch_id = '')
69 69
     {
70 70
         return $this->addSubDevConfig([
71
-            'appid'      => $appid ? : $this->app['config']->appid,
72
-            'sub_mch_id' => $sub_mch_id ? : $this->app['config']->sub_mch_id,
71
+            'appid'      => $appid ?: $this->app['config']->appid,
72
+            'sub_mch_id' => $sub_mch_id ?: $this->app['config']->sub_mch_id,
73 73
             'jsapi_path' => $jsapi_path,
74 74
         ]);
75 75
     }
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
     public function bindAppid(string $sub_appid, string $appid = '', string $sub_mch_id = '')
91 91
     {
92 92
         return $this->addSubDevConfig([
93
-            'appid'      => $appid ? : $this->app['config']->appid,
94
-            'sub_mch_id' => $sub_mch_id ? : $this->app['config']->sub_mch_id,
93
+            'appid'      => $appid ?: $this->app['config']->appid,
94
+            'sub_mch_id' => $sub_mch_id ?: $this->app['config']->sub_mch_id,
95 95
             'sub_appid'  => $sub_appid,
96 96
         ]);
97 97
     }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     public function querySubDevConfig($sub_mch_id = '')
127 127
     {
128 128
         return $this->safeRequest('secapi/mch/querysubdevconfig', [
129
-            'sub_mch_id' => $sub_mch_id ? : $this->app['config']->sub_mch_id,
129
+            'sub_mch_id' => $sub_mch_id ?: $this->app['config']->sub_mch_id,
130 130
         ]);
131 131
     }
132 132
 }
Please login to merge, or discard this patch.
src/MicroMerchant/Base/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
         return $this->safeRequest('applyment/micro/getupgradestate', [
115 115
             'version'    => '1.0',
116 116
             'sign_type'  => 'HMAC-SHA256',
117
-            'sub_mch_id' => $sub_mch_id ? : $this->app['config']->sub_mch_id,
117
+            'sub_mch_id' => $sub_mch_id ?: $this->app['config']->sub_mch_id,
118 118
             'nonce_str'  => uniqid('micro'),
119 119
         ]);
120 120
     }
Please login to merge, or discard this patch.
src/MicroMerchant/Withdraw/Client.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             'date'       => $date,
40 40
             'sign_type'  => 'HMAC-SHA256',
41 41
             'nonce_str'  => uniqid('micro'),
42
-            'sub_mch_id' => $sub_mch_id ? : $this->app['config']->sub_mch_id,
42
+            'sub_mch_id' => $sub_mch_id ?: $this->app['config']->sub_mch_id,
43 43
         ]);
44 44
     }
45 45
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             'date'       => $date,
62 62
             'sign_type'  => 'HMAC-SHA256',
63 63
             'nonce_str'  => uniqid('micro'),
64
-            'sub_mch_id' => $sub_mch_id ? : $this->app['config']->sub_mch_id,
64
+            'sub_mch_id' => $sub_mch_id ?: $this->app['config']->sub_mch_id,
65 65
         ]);
66 66
     }
67 67
 }
Please login to merge, or discard this patch.