Passed
Pull Request — master (#231)
by
unknown
03:31 queued 56s
created
src/Drivers/Digipay/Digipay.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -114,14 +114,14 @@  discard block
 block discarded – undo
114 114
             ->client
115 115
             ->request(
116 116
                 'POST',
117
-                $this->settings->apiPaymentUrl . self::PURCHASE_URL,
117
+                $this->settings->apiPaymentUrl.self::PURCHASE_URL,
118 118
                 [
119 119
                     RequestOptions::BODY  => json_encode($data),
120 120
                     RequestOptions::QUERY  => ['type' => $digipayType],
121 121
                     RequestOptions::HEADERS   => [
122 122
                         'Agent' => $this->invoice->getDetail('agent') ?? 'WEB',
123 123
                         'Content-Type'  => 'application/json',
124
-                        'Authorization' => 'Bearer ' . $this->oauthToken,
124
+                        'Authorization' => 'Bearer '.$this->oauthToken,
125 125
                         'Digipay-Version' => self::VERSION,
126 126
                     ],
127 127
                     RequestOptions::HTTP_ERRORS => false,
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
 
162 162
         $response = $this->client->request(
163 163
             'POST',
164
-            $this->settings->apiPaymentUrl . self::VERIFY_URL . $tracingId,
164
+            $this->settings->apiPaymentUrl.self::VERIFY_URL.$tracingId,
165 165
             [
166 166
                 RequestOptions::QUERY      => ['type' => $digipayTicketType],
167 167
                 RequestOptions::HEADERS    => [
168 168
                     "Accept"        => "application/json",
169
-                    "Authorization" => "Bearer " . $this->oauthToken,
169
+                    "Authorization" => "Bearer ".$this->oauthToken,
170 170
                 ],
171 171
                 RequestOptions::HTTP_ERRORS => false,
172 172
             ]
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
             ->client
192 192
             ->request(
193 193
                 'POST',
194
-                $this->settings->apiPaymentUrl . self::OAUTH_URL,
194
+                $this->settings->apiPaymentUrl.self::OAUTH_URL,
195 195
                 [
196 196
                     RequestOptions::HEADERS   => [
197
-                        'Authorization' => 'Basic ' . base64_encode("{$this->settings->client_id}:{$this->settings->client_secret}"),
197
+                        'Authorization' => 'Basic '.base64_encode("{$this->settings->client_id}:{$this->settings->client_secret}"),
198 198
                     ],
199 199
                     RequestOptions::MULTIPART   => [
200 200
                         [
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
             ->client
252 252
             ->request(
253 253
                 'POST',
254
-                $this->settings->apiPaymentUrl . self::REVERSE_URL,
254
+                $this->settings->apiPaymentUrl.self::REVERSE_URL,
255 255
                 [
256 256
                     RequestOptions::BODY        => json_encode($data),
257 257
                     RequestOptions::QUERY       => ['type' => $digipayTicketType],
258 258
                     RequestOptions::HEADERS     => [
259 259
                         'Content-Type'    => 'application/json;charset=UTF-8',
260
-                        'Authorization'   => 'Bearer ' . $this->oauthToken,
260
+                        'Authorization'   => 'Bearer '.$this->oauthToken,
261 261
                     ],
262 262
                     RequestOptions::HTTP_ERRORS => false,
263 263
                 ]
@@ -295,15 +295,15 @@  discard block
 block discarded – undo
295 295
         /**
296 296
          * This api call only need when has a type [5,13] in pay response
297 297
          */
298
-        if (!in_array($type, [5,13])) {
298
+        if (!in_array($type, [5, 13])) {
299 299
             throw new PurchaseFailedException('This method is not supported for this type.');
300 300
         }
301 301
 
302
-        if (! is_array($products)) {
302
+        if (!is_array($products)) {
303 303
             throw new PurchaseFailedException('products must be an array.');
304 304
         }
305 305
 
306
-        if (! DateTime::createFromFormat('Y-m-d', $deliveryDate)) {
306
+        if (!DateTime::createFromFormat('Y-m-d', $deliveryDate)) {
307 307
             throw new PurchaseFailedException('deliveryDate must be a valid date with format Y-m-d.');
308 308
         }
309 309
 
@@ -311,13 +311,13 @@  discard block
 block discarded – undo
311 311
             ->client
312 312
             ->request(
313 313
                 'POST',
314
-                $this->settings->apiPaymentUrl . self::DELIVER_URL,
314
+                $this->settings->apiPaymentUrl.self::DELIVER_URL,
315 315
                 [
316 316
                     RequestOptions::BODY        => json_encode($data),
317 317
                     RequestOptions::QUERY       => ['type' => $type],
318 318
                     RequestOptions::HEADERS     => [
319 319
                         'Content-Type'    => 'application/json;charset=UTF-8',
320
-                        'Authorization'   => 'Bearer ' . $this->oauthToken,
320
+                        'Authorization'   => 'Bearer '.$this->oauthToken,
321 321
                     ],
322 322
                     RequestOptions::HTTP_ERRORS => false,
323 323
                 ]
Please login to merge, or discard this patch.