Passed
Pull Request — master (#351)
by Jason
09:43
created
src/ORM/FoxyStripePageExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
         if ($config->EnableSidecart) {
20 20
             Requirements::javascript(
21
-                "https://cdn.foxycart.com/" . FoxyCart::getFoxyCartStoreName() . "/loader.js",
21
+                "https://cdn.foxycart.com/".FoxyCart::getFoxyCartStoreName()."/loader.js",
22 22
                 [
23 23
                     "async" => true,
24 24
                     "defer" => true,
Please login to merge, or discard this patch.
src/Page/ProductPage.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -187,14 +187,13 @@  discard block
 block discarded – undo
187 187
 
188 188
         // allow extensions of ProductPage to override the PreviewImage field description
189 189
         $previewDescription = ($this->config()->get('customPreviewDescription')) ?
190
-            $this->config()->get('customPreviewDescription') :
191
-            _t(
190
+            $this->config()->get('customPreviewDescription') : _t(
192 191
                 'ProductPage.PreviewImageDescription',
193 192
                 'Image used throughout site to represent this product'
194 193
             );
195 194
 
196 195
         // Cateogry Dropdown field w/ add new
197
-        $source = function () {
196
+        $source = function() {
198 197
             return ProductCategory::get()->map()->toArray();
199 198
         };
200 199
         $catField = DropdownField::create('CategoryID', _t('ProductPage.Category', 'FoxyCart Category'), $source())
@@ -328,7 +327,7 @@  discard block
 block discarded – undo
328 327
             $product = self::get()->byID($this->ID);
329 328
             if (isset($product->ParentID)) {
330 329
                 $origParent = $product->ParentID;
331
-            } else {
330
+            }else {
332 331
                 $origParent = null;
333 332
             }
334 333
             $currentParent = $this->ParentID;
@@ -415,8 +414,7 @@  discard block
 block discarded – undo
415 414
         $optionName = ($optionName !== null) ? preg_replace('/\s/', '_', $optionName) : $optionName;
416 415
 
417 416
         return (FoxyStripeSetting::current_foxystripe_setting()->CartValidation)
418
-            ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) :
419
-            $optionValue;
417
+            ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : $optionValue;
420 418
     }
421 419
 
422 420
     /**
Please login to merge, or discard this patch.
src/Controller/FoxyStripeController.php 1 patch
Spacing   +9 added lines, -11 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
         // handle POST from FoxyCart API transaction
44 44
         if ((isset($_POST['FoxyData']) or isset($_POST['FoxySubscriptionData']))) {
45 45
             $FoxyData_encrypted = (isset($_POST['FoxyData'])) ?
46
-                urldecode($_POST['FoxyData']) :
47
-                urldecode($_POST['FoxySubscriptionData']);
46
+                urldecode($_POST['FoxyData']) : urldecode($_POST['FoxySubscriptionData']);
48 47
             $FoxyData_decrypted = \rc4crypt::decrypt(FoxyCart::getStoreKey(), $FoxyData_encrypted);
49 48
 
50 49
             // parse the response and save the order
@@ -54,7 +53,7 @@  discard block
 block discarded – undo
54 53
             $this->extend('addIntegrations', $FoxyData_encrypted);
55 54
 
56 55
             return 'foxy';
57
-        } else {
56
+        }else {
58 57
             return 'No FoxyData or FoxySubscriptionData received.';
59 58
         }
60 59
     }
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
             // if FoxyCart order id, then parse order
75 74
             if (isset($transaction->id)) {
76 75
                 ($order = Order::get()->filter('Order_ID', (int)$transaction->id)->First()) ?
77
-                    $order = Order::get()->filter('Order_ID', (int)$transaction->id)->First() :
78
-                    $order = Order::create();
76
+                    $order = Order::get()->filter('Order_ID', (int)$transaction->id)->First() : $order = Order::create();
79 77
 
80 78
                 // save base order info
81 79
                 $order->Order_ID = (int)$transaction->id;
@@ -134,7 +132,7 @@  discard block
 block discarded – undo
134 132
                 /* todo: make sure local password is updated if changed on FoxyCart
135 133
                 $this->updatePasswordFromData($customer, $order);
136 134
                 */
137
-            } else {
135
+            }else {
138 136
                 // create new Member, set password info from FoxyCart
139 137
                 $customer = Member::create();
140 138
                 $customer->Customer_ID = (int)$order->customer_id;
@@ -231,7 +229,7 @@  discard block
 block discarded – undo
231 229
             }
232 230
 
233 231
             return ProductPage::get()
234
-                ->filter('ID', (int) $productOptions->product_option_value)
232
+                ->filter('ID', (int)$productOptions->product_option_value)
235 233
                 ->First();
236 234
         }
237 235
     }
@@ -281,18 +279,18 @@  discard block
 block discarded – undo
281 279
         // to do: consider a login/registration form here if not logged in
282 280
         if ($Member = Security::getCurrentUser()) {
283 281
             $Member = Security::getCurrentUser();
284
-        } else {
282
+        }else {
285 283
             $Member = new Member();
286 284
             $Member->Customer_ID = 0;
287 285
         }
288 286
 
289
-        $auth_token = sha1($Member->Customer_ID . '|' . $timestampNew . '|' . FoxyCart::getStoreKey());
287
+        $auth_token = sha1($Member->Customer_ID.'|'.$timestampNew.'|'.FoxyCart::getStoreKey());
290 288
 
291 289
         $config = FoxyStripeSetting::current_foxystripe_setting();
292 290
         if ($config->CustomSSL) {
293 291
             $link = FoxyCart::getFoxyCartStoreName();
294
-        } else {
295
-            $link = FoxyCart::getFoxyCartStoreName() . '.foxycart.com';
292
+        }else {
293
+            $link = FoxyCart::getFoxyCartStoreName().'.foxycart.com';
296 294
         }
297 295
 
298 296
         $redirect_complete = 'https://'.$link.'.foxycart.com/checkout?fc_auth_token='.
Please login to merge, or discard this patch.
src/Model/FoxyCart.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
             if ($config->RemoteDomain) {
76 76
                 return $config->RemoteDomain;
77 77
             }
78
-        } else {
79
-            if ($config->StoreName){
78
+        }else {
79
+            if ($config->StoreName) {
80 80
                 return $config->StoreName;
81 81
             }
82 82
         }
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
     public static function FormActionURL()
92 92
     {
93 93
         if ($config->CustomSSL) {
94
-            return sprintf('https://%s/cart', self::getFoxyCartStoreName() );
95
-        } else {
94
+            return sprintf('https://%s/cart', self::getFoxyCartStoreName());
95
+        }else {
96 96
             return sprintf('https://%s.foxycart.com/cart', self::getFoxyCartStoreName());
97 97
         }
98 98
     }
Please login to merge, or discard this patch.