Passed
Push — 2024_06_18_noProductSet ( f96c1e )
by Nic
15:15
created
src/Model/OptionGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function getCMSFields()
60 60
     {
61
-        $this->beforeUpdateCMSFields(function (FieldList $fields) {
61
+        $this->beforeUpdateCMSFields(function(FieldList $fields) {
62 62
             $fields->removeByName('Options');
63 63
 
64 64
             $fields->addFieldToTab(
Please login to merge, or discard this patch.
src/Model/OptionItem.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 )->setEmptyString('')
219 219
                     ->setDescription(_t('OptionItem.CodeDescription', 'Does code modify or replace base code?')),
220 220
             ]);
221
-        } else {
221
+        }else {
222 222
             $fields->addFieldsToTab(
223 223
                 'Root.Modifiers',
224 224
                 [
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         }
233 233
 
234 234
         // ProductOptionGroup Dropdown field w/ add new
235
-        $groups = function () {
235
+        $groups = function() {
236 236
             return OptionGroup::get()->map()->toArray();
237 237
         };
238 238
         $groupFields = singleton(OptionGroup::class)->getCMSFields();
@@ -339,9 +339,9 @@  discard block
 block discarded – undo
339 339
      */
340 340
     public function getGeneratedValue()
341 341
     {
342
-        $modPrice = ($this->PriceModifier) ? (string) $this->PriceModifier : '0';
342
+        $modPrice = ($this->PriceModifier) ? (string)$this->PriceModifier : '0';
343 343
         $modPriceWithSymbol = self::getOptionModifierActionSymbol($this->PriceModifierAction).$modPrice;
344
-        $modWeight = ($this->WeightModifier) ? (string) $this->WeightModifier : '0';
344
+        $modWeight = ($this->WeightModifier) ? (string)$this->WeightModifier : '0';
345 345
         $modWeight = self::getOptionModifierActionSymbol($this->WeightModifierAction).$modWeight;
346 346
         $modCode = self::getOptionModifierActionSymbol($this->CodeModifierAction).$this->CodeModifier;
347 347
 
@@ -353,14 +353,13 @@  discard block
 block discarded – undo
353 353
      */
354 354
     public function getGeneratedTitle()
355 355
     {
356
-        $modPrice = ($this->PriceModifier) ? (string) $this->PriceModifier : '0';
356
+        $modPrice = ($this->PriceModifier) ? (string)$this->PriceModifier : '0';
357 357
         $title = $this->Title;
358 358
         $title .= ($this->PriceModifier != 0) ?
359 359
             ': ('.self::getOptionModifierActionSymbol(
360 360
                 $this->PriceModifierAction,
361 361
                 $returnWithOnlyPlusMinus = true
362
-            ).'$'.$modPrice.')' :
363
-            '';
362
+            ).'$'.$modPrice.')' : '';
364 363
 
365 364
         return $title;
366 365
     }
Please login to merge, or discard this patch.