Passed
Push — master ( 535bd5...f77f61 )
by wannanbigpig
03:11
created
src/Payment/Pay/Client.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
         ], $params);
39 39
 
40 40
         $this->app->setEndpointConfig($method, [
41
-            'return_url' => $this->app['config']->get('return_url'),
42
-            'notify_url' => $this->app['config']->get('notify_url'),
41
+            'return_url' => $this->app[ 'config' ]->get('return_url'),
42
+            'notify_url' => $this->app[ 'config' ]->get('notify_url'),
43 43
         ]);
44 44
 
45 45
         return $this->sdkExecute($method, [
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
         ], $params);
67 67
 
68 68
         $this->app->setEndpointConfig($method, [
69
-            'return_url' => $this->app['config']->get('return_url'),
70
-            'notify_url' => $this->app['config']->get('notify_url'),
69
+            'return_url' => $this->app[ 'config' ]->get('return_url'),
70
+            'notify_url' => $this->app[ 'config' ]->get('notify_url'),
71 71
         ]);
72 72
 
73 73
         return $this->pageExecute($method, [
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
             'product_code' => 'FAST_INSTANT_TRADE_PAY',
94 94
         ], $params);
95 95
         $this->app->setEndpointConfig($method, [
96
-            'return_url' => $this->app['config']->get('return_url'),
97
-            'notify_url' => $this->app['config']->get('notify_url'),
96
+            'return_url' => $this->app[ 'config' ]->get('return_url'),
97
+            'notify_url' => $this->app[ 'config' ]->get('notify_url'),
98 98
         ]);
99 99
 
100 100
         return $this->pageExecute($method, [
Please login to merge, or discard this patch.
src/Payment/Base/Client.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             'product_code' => 'FACE_TO_FACE_PAYMENT',
40 40
         ], $params);
41 41
         $this->app->setEndpointConfig($method, [
42
-            'notify_url' => $this->app['config']->get('notify_url'),
42
+            'notify_url' => $this->app[ 'config' ]->get('notify_url'),
43 43
         ]);
44 44
 
45 45
         return $this->request($method, [
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $method = 'alipay.trade.create';
64 64
         $this->app->setEndpointConfig($method, [
65
-            'notify_url' => $this->app['config']->get('notify_url'),
65
+            'notify_url' => $this->app[ 'config' ]->get('notify_url'),
66 66
         ]);
67 67
 
68 68
         return $this->request($method, [
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $method = 'alipay.trade.precreate';
87 87
         $this->app->setEndpointConfig($method, [
88
-            'notify_url' => $this->app['config']->get('notify_url'),
88
+            'notify_url' => $this->app[ 'config' ]->get('notify_url'),
89 89
         ]);
90 90
 
91 91
         return $this->request($method, [
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             return !($this->checkEmpty($value));
119 119
         });
120 120
         $this->app->setEndpointConfig($method, [
121
-            'notify_url' => $this->app['config']->get('notify_url'),
121
+            'notify_url' => $this->app[ 'config' ]->get('notify_url'),
122 122
         ]);
123 123
 
124 124
         return $this->request($method, [
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
141 141
      * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
142 142
      */
143
-    public function refund(string $tradeNo, $amount, string $outTradeNo = null, array $params = [])
143
+    public function refund(string $tradeNo, $amount, string $outTradeNo = null, array $params = [ ])
144 144
     {
145 145
         $params = array_merge(array_filter([
146 146
             'trade_no' => $tradeNo,
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public function orderSettle(string $outRequestNo, string $tradeNo, array $royaltyParameters, string $operatorId = null)
227 227
     {
228
-        $royalty = [];
228
+        $royalty = [ ];
229 229
         if (count($royaltyParameters) === count($royaltyParameters, COUNT_RECURSIVE)) {
230
-            $royalty[0] = $royaltyParameters;
230
+            $royalty[ 0 ] = $royaltyParameters;
231 231
         } else {
232 232
             $royalty = $royaltyParameters;
233 233
         }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         });
273 273
 
274 274
         if (!($this->checkEmpty($orderBizInfo))) {
275
-            $params['order_biz_info'] = json_encode(['status' => $orderBizInfo]);
275
+            $params[ 'order_biz_info' ] = json_encode([ 'status' => $orderBizInfo ]);
276 276
         }
277 277
 
278 278
         return $this->request('alipay.trade.orderinfo.sync', [
Please login to merge, or discard this patch.
src/Kernel/ServiceContainer.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,26 +54,26 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * @var array
56 56
      */
57
-    protected $providers = [];
57
+    protected $providers = [ ];
58 58
 
59 59
     /**
60 60
      * @var array
61 61
      */
62
-    protected $userConfig = [];
62
+    protected $userConfig = [ ];
63 63
 
64 64
     /**
65 65
      * @var array
66 66
      */
67
-    protected $defaultConfig = [];
67
+    protected $defaultConfig = [ ];
68 68
 
69 69
     /**
70 70
      * Application constructor.
71 71
      *
72 72
      * @param array $config
73 73
      */
74
-    public function __construct(array $config = [])
74
+    public function __construct(array $config = [ ])
75 75
     {
76
-        parent::__construct(['app_client_providers' => $this->providers]);
76
+        parent::__construct([ 'app_client_providers' => $this->providers ]);
77 77
         $this->init($config);
78 78
         $this->registerProviders($this->getProviders());
79 79
     }
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function __get($name)
91 91
     {
92
-        if (isset($this[$name])) {
93
-            return $this[$name];
92
+        if (isset($this[ $name ])) {
93
+            return $this[ $name ];
94 94
         }
95 95
         throw new RuntimeException(sprintf('Identifier "%s" is not defined', $name));
96 96
     }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $this->config->set('api_method', $endpoint);
137 137
 
138 138
         return array_merge([
139
-            'app_id' => $this->config['sys_params.app_id'],
139
+            'app_id' => $this->config[ 'sys_params.app_id' ],
140 140
             'method' => $endpoint,
141 141
             'format' => 'JSON',
142 142
             'charset' => $this->config->get('sys_params.charset', 'utf-8'),
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             'timestamp' => date('Y-m-d H:i:s'),
146 146
             'version' => '1.0',
147 147
             'app_auth_token' => $this->config->get('sys_params.app_auth_token', ''),
148
-        ], $this->config->get($endpoint.'config', []));
148
+        ], $this->config->get($endpoint . 'config', [ ]));
149 149
     }
150 150
 
151 151
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function setEndpointConfig(string $endpoint, array $config)
160 160
     {
161
-        $this->config->set($endpoint.'config', $config);
161
+        $this->config->set($endpoint . 'config', $config);
162 162
 
163 163
         return $this;
164 164
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function getEnv(): bool
172 172
     {
173
-        return (bool)(isset($this->userConfig['sandbox']) ? $this->userConfig['sandbox'] : false);
173
+        return (bool) (isset($this->userConfig[ 'sandbox' ]) ? $this->userConfig[ 'sandbox' ] : false);
174 174
     }
175 175
 
176 176
     /**
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
     public function getGateway()
182 182
     {
183 183
         if ($this->getEnv()) {
184
-            return $this->gateway[self::DEV_ENV];
184
+            return $this->gateway[ self::DEV_ENV ];
185 185
         } else {
186
-            return $this->gateway[self::NORMAL_ENV];
186
+            return $this->gateway[ self::NORMAL_ENV ];
187 187
         }
188 188
     }
189 189
 
Please login to merge, or discard this patch.
src/Kernel/Providers/LogServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function register(Container $pimple)
31 31
     {
32
-        $pimple['logger'] = function ($app) {
32
+        $pimple[ 'logger' ] = function ($app) {
33 33
             $config = $this->logConfig($app);
34 34
 
35 35
             return new Log($config);
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function logConfig($app)
47 47
     {
48
-        $logConfig = [];
49
-        if (!empty($app['config']->get('log'))) {
50
-            $logConfig = $app['config']->get('log');
48
+        $logConfig = [ ];
49
+        if (!empty($app[ 'config' ]->get('log'))) {
50
+            $logConfig = $app[ 'config' ]->get('log');
51 51
         }
52 52
 
53 53
         return array_merge([
Please login to merge, or discard this patch.