Completed
Push — master ( 7a15ce...ca12b0 )
by Nic
20s queued 10s
created
src/Model/FoxyStripeClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             }
153 153
             if (count($errors)) {
154 154
                 Injector::inst()
155
-                    ->get(LoggerInterface::class)->error('setCurrentStore errors - ' . json_encode($errors));
155
+                    ->get(LoggerInterface::class)->error('setCurrentStore errors - '.json_encode($errors));
156 156
             }
157 157
         }
158 158
     }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
         $errors = array_merge($errors, $client->getErrors($result));
191 191
         if (count($errors)) {
192
-            Injector::inst()->get(LoggerInterface::class)->error('updateStore errors - ' . json_encode($errors));
192
+            Injector::inst()->get(LoggerInterface::class)->error('updateStore errors - '.json_encode($errors));
193 193
         }
194 194
     }
195 195
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             $errors = array_merge($errors, $client->getErrors($result));
220 220
             if (count($errors)) {
221 221
                 Injector::inst()
222
-                    ->get(LoggerInterface::class)->error('setItemCategoriesURL errors - ' . json_encode($errors));
222
+                    ->get(LoggerInterface::class)->error('setItemCategoriesURL errors - '.json_encode($errors));
223 223
             }
224 224
         }
225 225
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             $errors = array_merge($errors, $client->getErrors($result));
249 249
             if (count($errors)) {
250 250
                 Injector::inst()
251
-                    ->get(LoggerInterface::class)->error('setItemCategories errors - ' . json_encode($errors));
251
+                    ->get(LoggerInterface::class)->error('setItemCategories errors - '.json_encode($errors));
252 252
             }
253 253
         }
254 254
     }
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                 $errors = array_merge($errors, $client->getErrors($result));
278 278
                 if (count($errors)) {
279 279
                     Injector::inst()
280
-                        ->get(LoggerInterface::class)->error('getCategory errors - ' . json_encode($errors));
280
+                        ->get(LoggerInterface::class)->error('getCategory errors - '.json_encode($errors));
281 281
                 }
282 282
             }
283 283
         }
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
         if ($client) {
299 299
             if ($category = $this->getCategory($data['code'])) {
300 300
                 $result = $client->patch($category, $data);
301
-            } else {
301
+            }else {
302 302
                 $result = $client->post($this->getItemCategoriesURL(), $data);
303 303
             }
304 304
             $errors = array_merge($errors, $client->getErrors($result));
305 305
             if (count($errors)) {
306
-                Injector::inst()->get(LoggerInterface::class)->error('putCategory errors - ' . json_encode($errors));
306
+                Injector::inst()->get(LoggerInterface::class)->error('putCategory errors - '.json_encode($errors));
307 307
             }
308 308
         }
309 309
     }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 
324 324
             $errors = array_merge($errors, $client->getErrors($result));
325 325
             if (count($errors)) {
326
-                Injector::inst()->get(LoggerInterface::class)->error('deleteCategory errors - ' . json_encode($errors));
326
+                Injector::inst()->get(LoggerInterface::class)->error('deleteCategory errors - '.json_encode($errors));
327 327
             }
328 328
         }
329 329
     }
Please login to merge, or discard this patch.
src/Controller/FoxyStripeController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,13 +138,13 @@
 block discarded – undo
138 138
             $Member->Customer_ID = 0;
139 139
         }
140 140
 
141
-        $auth_token = sha1($Member->Customer_ID . '|' . $timestampNew . '|' . FoxyCart::getStoreKey());
141
+        $auth_token = sha1($Member->Customer_ID.'|'.$timestampNew.'|'.FoxyCart::getStoreKey());
142 142
 
143 143
         $config = FoxyStripeSetting::current_foxystripe_setting();
144 144
         if ($config->CustomSSL) {
145 145
             $link = FoxyCart::getFoxyCartStoreName();
146
-        } else {
147
-            $link = FoxyCart::getFoxyCartStoreName() . '.foxycart.com';
146
+        }else {
147
+            $link = FoxyCart::getFoxyCartStoreName().'.foxycart.com';
148 148
         }
149 149
 
150 150
         $params = [
Please login to merge, or discard this patch.
src/Model/Order.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     {
176 176
         $obj = DBHTMLVarchar::create();
177 177
         $obj->setValue(
178
-            '<a href="' . $this->ReceiptURL . '" target="_blank" class="cms-panel-link action external-link">view</a>'
178
+            '<a href="'.$this->ReceiptURL.'" target="_blank" class="cms-panel-link action external-link">view</a>'
179 179
         );
180 180
 
181 181
         return $obj;
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         if ($this->Response) {
212 212
             $this->transaction = Transaction::create($this->Order_ID, urldecode($this->Response));
213
-        } else {
213
+        }else {
214 214
             $this->transaction = false;
215 215
         }
216 216
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                     if ($OrderProduct) {
330 330
                         $OrderDetail->ProductID = $OrderProduct->ID;
331 331
                     }
332
-                } else {
332
+                }else {
333 333
                     $OrderOption = OrderOption::create();
334 334
                     $OrderOption->Name = (string)$option->product_option_name;
335 335
                     $OrderOption->Value = (string)$option->product_option_value;
Please login to merge, or discard this patch.
src/Page/ProductHolder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function getCMSFields()
71 71
     {
72
-        $this->beforeUpdateCMSFields(function (FieldList $fields) {
72
+        $this->beforeUpdateCMSFields(function(FieldList $fields) {
73 73
             if (FoxyStripeSetting::current_foxystripe_setting()->MultiGroup) {
74 74
                 $config = GridFieldConfig_RelationEditor::create();
75 75
                 $config->addComponent(new GridFieldOrderableRows('SortOrder'));
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 
151 151
         if ($config->MultiGroup) {
152 152
             $entries = $this->Products()->sort('SortOrder');
153
-        } else {
154
-            $filter = '"ParentID" = ' . $this->ID;
153
+        }else {
154
+            $filter = '"ParentID" = '.$this->ID;
155 155
 
156 156
             // Build a list of all IDs for ProductGroups that are children
157 157
             $holderIDs = $this->ProductGroupIDs();
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                 if ($filter) {
163 163
                     $filter .= ' OR ';
164 164
                 }
165
-                $filter .= '"ParentID" IN (' . implode(',', $holderIDs) . ')';
165
+                $filter .= '"ParentID" IN ('.implode(',', $holderIDs).')';
166 166
             }
167 167
 
168 168
             $order = '"SiteTree"."Title" ASC';
Please login to merge, or discard this patch.
src/Form/FoxyStripePurchaseForm.php 1 patch
Spacing   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -117,12 +117,10 @@  discard block
 block discarded – undo
117 117
         $this->setSiteConfig($siteConfig);
118 118
 
119 119
         $fields = ($fields != null && $fields->exists()) ?
120
-            $this->getProductFields($fields) :
121
-            $this->getProductFields(FieldList::create());
120
+            $this->getProductFields($fields) : $this->getProductFields(FieldList::create());
122 121
 
123 122
         $actions = ($actions != null && $actions->exists()) ?
124
-            $this->getProductActions($actions) :
125
-            $this->getProductActions(FieldList::create());
123
+            $this->getProductActions($actions) : $this->getProductActions(FieldList::create());
126 124
         $validator = (!empty($validator) || $validator != null) ? $validator : RequiredFields::create();
127 125
 
128 126
         parent::__construct($controller, $name, $fields, $actions, $validator);
@@ -131,7 +129,7 @@  discard block
 block discarded – undo
131 129
         $this->setAttribute('action', FoxyCart::FormActionURL());
132 130
         $this->disableSecurityToken();
133 131
 
134
-        $this->setHTMLID($this->getTemplateHelper()->generateFormID($this) . "_{$product->ID}");
132
+        $this->setHTMLID($this->getTemplateHelper()->generateFormID($this)."_{$product->ID}");
135 133
     }
136 134
 
137 135
     /**
@@ -143,8 +141,7 @@  discard block
 block discarded – undo
143 141
     {
144 142
         //Requirements::javascript('dynamic/foxystripe: client/dist/javascript/scripts.min.js');
145 143
         $hiddenTitle = ($this->product->ReceiptTitle) ?
146
-            htmlspecialchars($this->product->ReceiptTitle) :
147
-            htmlspecialchars($this->product->Title);
144
+            htmlspecialchars($this->product->ReceiptTitle) : htmlspecialchars($this->product->Title);
148 145
         $code = $this->product->Code;
149 146
 
150 147
         if ($this->getProduct()->getIsAvailable()) {
@@ -178,7 +175,7 @@  discard block
 block discarded – undo
178 175
                     ->setValue(
179 176
                         ProductPage::getGeneratedValue($code, 'price', $this->product->Price, 'value')
180 177
                     )
181
-            );//can't override id
178
+            ); //can't override id
182 179
             if ($this->product->Weight > 0) {
183 180
                 $fields->push(
184 181
                     HiddenField::create('weight')
@@ -221,7 +218,7 @@  discard block
 block discarded – undo
221 218
             );
222 219
 
223 220
             $fields->push(
224
-                HeaderField::create('submitPrice', '$' . $this->product->Price, 4)
221
+                HeaderField::create('submitPrice', '$'.$this->product->Price, 4)
225 222
                     ->addExtraClass('submit-price')
226 223
             );
227 224
             $fields->push(
@@ -234,7 +231,7 @@  discard block
 block discarded – undo
234 231
             }
235 232
 
236 233
             $this->extend('updatePurchaseFormFields', $fields);
237
-        } else {
234
+        }else {
238 235
             $fields->push(HeaderField::create('unavailableText', 'Currently Out of Stock', 4));
239 236
         }
240 237
 
Please login to merge, or discard this patch.
src/Model/FoxyCart.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             if ($config->RemoteDomain) {
76 76
                 return $config->RemoteDomain;
77 77
             }
78
-        } else {
78
+        }else {
79 79
             if ($config->StoreName) {
80 80
                 return $config->StoreName;
81 81
             }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $config = FoxyStripeSetting::current_foxystripe_setting();
94 94
         if ($config->CustomSSL) {
95 95
             return sprintf('https://%s/cart', self::getFoxyCartStoreName());
96
-        } else {
96
+        }else {
97 97
             return sprintf('https://%s.foxycart.com/cart', self::getFoxyCartStoreName());
98 98
         }
99 99
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $config = FoxyStripeSetting::current_foxystripe_setting();
114 114
             if ($config->CustomSSL) {
115 115
                 $foxy_domain = self::getFoxyCartStoreName();
116
-            } else {
116
+            }else {
117 117
                 $foxy_domain = self::getFoxyCartStoreName().'.foxycart.com';
118 118
             }
119 119
 
Please login to merge, or discard this patch.