Passed
Pull Request — master (#373)
by Nic
05:57
created
src/Controller/FoxyStripeController.php 1 patch
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@  discard block
 block discarded – undo
45 45
         // handle POST from FoxyCart API transaction
46 46
         if ((isset($_POST['FoxyData']) or isset($_POST['FoxySubscriptionData']))) {
47 47
             $FoxyData_encrypted = (isset($_POST['FoxyData'])) ?
48
-                urldecode($_POST['FoxyData']) :
49
-                urldecode($_POST['FoxySubscriptionData']);
48
+                urldecode($_POST['FoxyData']) : urldecode($_POST['FoxySubscriptionData']);
50 49
             $FoxyData_decrypted = \rc4crypt::decrypt(FoxyCart::getStoreKey(), $FoxyData_encrypted);
51 50
 
52 51
             // parse the response and save the order
@@ -56,7 +55,7 @@  discard block
 block discarded – undo
56 55
             $this->extend('addIntegrations', $FoxyData_encrypted);
57 56
 
58 57
             return 'foxy';
59
-        } else {
58
+        }else {
60 59
             return 'No FoxyData or FoxySubscriptionData received.';
61 60
         }
62 61
     }
@@ -149,7 +148,7 @@  discard block
 block discarded – undo
149 148
                 /* todo: make sure local password is updated if changed on FoxyCart
150 149
                 $this->updatePasswordFromData($customer, $order);
151 150
                 */
152
-            } else {
151
+            }else {
153 152
                 // create new Member, set password info from FoxyCart
154 153
                 $customer = Member::create();
155 154
                 $customer->Customer_ID = (int)$order->customer_id;
@@ -322,22 +321,22 @@  discard block
 block discarded – undo
322 321
         // to do: consider a login/registration form here if not logged in
323 322
         if ($Member = Security::getCurrentUser()) {
324 323
             $Member = Security::getCurrentUser();
325
-        } else {
324
+        }else {
326 325
             $Member = new Member();
327 326
             $Member->Customer_ID = 0;
328 327
         }
329 328
 
330
-        $auth_token = sha1($Member->Customer_ID . '|' . $timestampNew . '|' . FoxyCart::getStoreKey());
329
+        $auth_token = sha1($Member->Customer_ID.'|'.$timestampNew.'|'.FoxyCart::getStoreKey());
331 330
 
332 331
         $config = FoxyStripeSetting::current_foxystripe_setting();
333 332
         if ($config->CustomSSL) {
334 333
             $link = FoxyCart::getFoxyCartStoreName();
335
-        } else {
336
-            $link = FoxyCart::getFoxyCartStoreName() . '.foxycart.com';
334
+        }else {
335
+            $link = FoxyCart::getFoxyCartStoreName().'.foxycart.com';
337 336
         }
338 337
 
339
-        $redirect_complete = 'https://' . $link . '/checkout?fc_auth_token=' . $auth_token . '&fcsid=' . $fcsid .
340
-            '&fc_customer_id=' . $Member->Customer_ID . '&timestamp=' . $timestampNew;
338
+        $redirect_complete = 'https://'.$link.'/checkout?fc_auth_token='.$auth_token.'&fcsid='.$fcsid.
339
+            '&fc_customer_id='.$Member->Customer_ID.'&timestamp='.$timestampNew;
341 340
 
342 341
         $this->redirect($redirect_complete);
343 342
     }
Please login to merge, or discard this patch.
src/Model/FoxyStripeClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 }
152 152
             }
153 153
             if (count($errors)) {
154
-                Injector::inst()->get(LoggerInterface::class)->error('setCurrentStore errors - ' . json_encode($errors));
154
+                Injector::inst()->get(LoggerInterface::class)->error('setCurrentStore errors - '.json_encode($errors));
155 155
             }
156 156
         }
157 157
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
         $errors = array_merge($errors, $client->getErrors($result));
190 190
         if (count($errors)) {
191
-            Injector::inst()->get(LoggerInterface::class)->error('updateStore errors - ' . json_encode($errors));
191
+            Injector::inst()->get(LoggerInterface::class)->error('updateStore errors - '.json_encode($errors));
192 192
         }
193 193
     }
194 194
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             $errors = array_merge($errors, $client->getErrors($result));
219 219
             if (count($errors)) {
220 220
                 Injector::inst()
221
-                    ->get(LoggerInterface::class)->error('setItemCategoriesURL errors - ' . json_encode($errors));
221
+                    ->get(LoggerInterface::class)->error('setItemCategoriesURL errors - '.json_encode($errors));
222 222
             }
223 223
         }
224 224
     }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             $errors = array_merge($errors, $client->getErrors($result));
248 248
             if (count($errors)) {
249 249
                 Injector::inst()
250
-                    ->get(LoggerInterface::class)->error('setItemCategories errors - ' . json_encode($errors));
250
+                    ->get(LoggerInterface::class)->error('setItemCategories errors - '.json_encode($errors));
251 251
             }
252 252
         }
253 253
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
                 }
276 276
                 $errors = array_merge($errors, $client->getErrors($result));
277 277
                 if (count($errors)) {
278
-                    Injector::inst()->get(LoggerInterface::class)->error('getCategory errors - ' . json_encode($errors));
278
+                    Injector::inst()->get(LoggerInterface::class)->error('getCategory errors - '.json_encode($errors));
279 279
                 }
280 280
             }
281 281
         }
@@ -296,12 +296,12 @@  discard block
 block discarded – undo
296 296
         if ($client) {
297 297
             if ($category = $this->getCategory($data['code'])) {
298 298
                 $result = $client->patch($category, $data);
299
-            } else {
299
+            }else {
300 300
                 $result = $client->post($this->getItemCategoriesURL(), $data);
301 301
             }
302 302
             $errors = array_merge($errors, $client->getErrors($result));
303 303
             if (count($errors)) {
304
-                Injector::inst()->get(LoggerInterface::class)->error('putCategory errors - ' . json_encode($errors));
304
+                Injector::inst()->get(LoggerInterface::class)->error('putCategory errors - '.json_encode($errors));
305 305
             }
306 306
         }
307 307
     }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
             $errors = array_merge($errors, $client->getErrors($result));
323 323
             if (count($errors)) {
324
-                Injector::inst()->get(LoggerInterface::class)->error('deleteCategory errors - ' . json_encode($errors));
324
+                Injector::inst()->get(LoggerInterface::class)->error('deleteCategory errors - '.json_encode($errors));
325 325
             }
326 326
         }
327 327
     }
Please login to merge, or discard this patch.
src/API/Client/CustomerClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 
100 100
         if (!$this->getCustomer()->Customer_ID) {
101 101
             $response = $client->post($this->getNewCustomerAPIURI(), $this->getSendData());
102
-        } else {
102
+        }else {
103 103
             $response = $client->patch($this->getAPIURI(true), $this->getSendData());
104 104
         }
105 105
 
Please login to merge, or discard this patch.