Completed
Push — master ( 02ff86...c211ae )
by Raza
03:46 queued 56s
created
src/Providers/PayPalServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@
 block discarded – undo
55 55
      */
56 56
     private function registerPayPal()
57 57
     {
58
-        $this->app->singleton('express_checkout', function () {
58
+        $this->app->singleton('express_checkout', function() {
59 59
             return new ExpressCheckout();
60 60
         });
61 61
 
62
-        $this->app->singleton('adaptive_payments', function () {
62
+        $this->app->singleton('adaptive_payments', function() {
63 63
             return new AdaptivePayments();
64 64
         });
65 65
     }
Please login to merge, or discard this patch.
src/Services/ExpressCheckout.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
      */
70 70
     protected function setCartItems($items)
71 71
     {
72
-        return (new Collection($items))->map(function ($item, $num) {
72
+        return (new Collection($items))->map(function($item, $num) {
73 73
             return [
74 74
                 'L_PAYMENTREQUEST_0_NAME'.$num  => $item['name'],
75 75
                 'L_PAYMENTREQUEST_0_AMT'.$num   => $item['price'],
76 76
                 'L_PAYMENTREQUEST_0_QTY'.$num   => $item['qty'],
77 77
             ];
78
-        })->flatMap(function ($value) {
78
+        })->flatMap(function($value) {
79 79
             return $value;
80 80
         });
81 81
     }
@@ -113,8 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
         $response = $this->doPayPalRequest('SetExpressCheckout');
115 115
 
116
-        $response['paypal_link'] = empty($response['TOKEN']) ?:
117
-            $this->config['gateway_url'].'/webscr?cmd=_express-checkout&token='.$response['TOKEN'];
116
+        $response['paypal_link'] = empty($response['TOKEN']) ?: $this->config['gateway_url'].'/webscr?cmd=_express-checkout&token='.$response['TOKEN'];
118 117
 
119 118
         return $response;
120 119
     }
Please login to merge, or discard this patch.
src/Traits/PayPalRequest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -393,7 +393,7 @@
 block discarded – undo
393 393
      * Parse PayPal NVP Response.
394 394
      *
395 395
      * @param string $method
396
-     * @param mixed  $response
396
+     * @param \Psr\Http\Message\StreamInterface  $response
397 397
      *
398 398
      * @return array
399 399
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $this->setApiEnvironment($credentials);
144 144
 
145 145
         // Setting PayPal API Credentials
146
-        collect($credentials[$this->mode])->map(function ($value, $key) {
146
+        collect($credentials[$this->mode])->map(function($value, $key) {
147 147
             $this->config[$key] = $value;
148 148
         });
149 149
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         ], $this->options);
334 334
 
335 335
         $this->post = $this->post->merge($config)
336
-            ->filter(function ($value, $key) use ($method) {
336
+            ->filter(function($value, $key) use ($method) {
337 337
                 return (($method === 'verifyipn') && ($key === 'METHOD')) ?: $value;
338 338
             });
339 339
     }
Please login to merge, or discard this patch.