Completed
Push — master ( b71b1e...403f2c )
by Raza
01:25
created
src/Services/AdaptivePayments.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@
 block discarded – undo
251 251
     /**
252 252
      * Function To Perform PayPal API Request.
253 253
      *
254
-     * @param $method
254
+     * @param string $method
255 255
      * @return array|mixed
256 256
      */
257 257
     private function doPayPalRequest($method)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             'cancelUrl'       => $data['cancel_url'],
94 94
             'requestEnvelope' => $this->setEnvelope(),
95 95
             'feesPayer'       => $data['payer'],
96
-        ])->filter(static function ($value, $key) {
96
+        ])->filter(static function($value, $key) {
97 97
             return $key === 'feesPayer' && empty($value) ? null : $value;
98 98
         });
99 99
     }
@@ -181,14 +181,14 @@  discard block
 block discarded – undo
181 181
     public function getRedirectUrl($option, $payKey)
182 182
     {
183 183
         if ($option === 'approved') {
184
-            return $this->config['gateway_url'] . '?cmd=' . '_ap-payment&paykey='.$payKey;
184
+            return $this->config['gateway_url'].'?cmd='.'_ap-payment&paykey='.$payKey;
185 185
         }
186 186
 
187 187
         if ($option === 'pre-approved') {
188
-            return $this->config['gateway_url'] . '?cmd=' . '_ap-preapproval&preapprovalkey='.$payKey;
188
+            return $this->config['gateway_url'].'?cmd='.'_ap-preapproval&preapprovalkey='.$payKey;
189 189
         }
190 190
 
191
-        return $this->config['gateway_url'] . '?cmd=';
191
+        return $this->config['gateway_url'].'?cmd=';
192 192
     }
193 193
 
194 194
     /**
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
      */
201 201
     private function setPaymentOptionsReceiverDetails($receivers)
202 202
     {
203
-        return collect($receivers)->map(static function ($receiver) {
203
+        return collect($receivers)->map(static function($receiver) {
204 204
             $item = [];
205 205
 
206 206
             $item['receiver'] = [
207 207
                 'email' => $receiver['email'],
208 208
             ];
209 209
 
210
-            $item['invoiceData']['item'] = collect($receiver['invoice_data'])->map(function ($invoice) {
210
+            $item['invoiceData']['item'] = collect($receiver['invoice_data'])->map(function($invoice) {
211 211
                 return $invoice;
212 212
             })->toArray();
213 213
 
Please login to merge, or discard this patch.
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', static function () {
58
+        $this->app->singleton('express_checkout', static function() {
59 59
             return new ExpressCheckout();
60 60
         });
61 61
 
62
-        $this->app->singleton('adaptive_payments', static function () {
62
+        $this->app->singleton('adaptive_payments', static function() {
63 63
             return new AdaptivePayments();
64 64
         });
65 65
     }
Please login to merge, or discard this patch.
src/Traits/PayPalHttpClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
                 $this->httpBodyParam => $this->post->toArray(),
92 92
             ])->getBody();
93 93
         } catch (Throwable $t) {
94
-            throw new RuntimeException($t->getRequest() . ' ' . $t->getResponse());
94
+            throw new RuntimeException($t->getRequest().' '.$t->getResponse());
95 95
         }
96 96
     }
97 97
 
Please login to merge, or discard this patch.
src/Services/ExpressCheckout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,14 +70,14 @@
 block discarded – undo
70 70
      */
71 71
     protected function setCartItems($items)
72 72
     {
73
-        return (new Collection($items))->map(static function ($item, $num) {
73
+        return (new Collection($items))->map(static function($item, $num) {
74 74
             return [
75 75
                 'L_PAYMENTREQUEST_0_NAME'.$num  => $item['name'],
76 76
                 'L_PAYMENTREQUEST_0_AMT'.$num   => $item['price'],
77 77
                 'L_PAYMENTREQUEST_0_DESC'.$num  => isset($item['desc']) ? $item['desc'] : null,
78 78
                 'L_PAYMENTREQUEST_0_QTY'.$num   => isset($item['qty']) ? $item['qty'] : 1,
79 79
             ];
80
-        })->flatMap(static function ($value) {
80
+        })->flatMap(static function($value) {
81 81
             return $value;
82 82
         });
83 83
     }
Please login to merge, or discard this patch.