Completed
Pull Request — master (#287)
by Nic
07:56
created
code/pages/ProductHolder.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,9 @@
 block discarded – undo
81 81
     {
82 82
         if ($children = $this->AllChildren()) {
83 83
             foreach ($children as $child) {
84
-                if (in_array($child->ID, $idList)) continue;
84
+                if (in_array($child->ID, $idList)) {
85
+                    continue;
86
+                }
85 87
 
86 88
                 if ($child instanceof ProductHolder) {
87 89
                     $idList[] = $child->ID;
Please login to merge, or discard this patch.
tests/FoxyStripeProductTest.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,14 +55,18 @@
 block discarded – undo
55 55
 
56 56
         $versions = DB::query('Select * FROM "FoxyStripeProduct_versions" WHERE "RecordID" = ' . $productID);
57 57
         $versionsPostPublish = array();
58
-        foreach ($versions as $versionRow) $versionsPostPublish[] = $versionRow;
58
+        foreach ($versions as $versionRow) {
59
+            $versionsPostPublish[] = $versionRow;
60
+        }
59 61
 
60 62
         $product2->delete();
61 63
         $this->assertTrue(!$product2->isPublished());
62 64
 
63 65
         $versions = DB::query('Select * FROM "FoxyStripeProduct_versions" WHERE "RecordID" = ' . $productID);
64 66
         $versionsPostDelete = array();
65
-        foreach ($versions as $versionRow) $versionsPostDelete[] = $versionRow;
67
+        foreach ($versions as $versionRow) {
68
+            $versionsPostDelete[] = $versionRow;
69
+        }
66 70
 
67 71
         $this->assertEquals($versionsPostPublish, $versionsPostDelete);
68 72
 
Please login to merge, or discard this patch.
code/objects/products/FoxyStripeProduct.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,11 +141,15 @@
 block discarded – undo
141 141
                             Settings > FoxyStripe > Categories
142 142
                         </a>'
143 143
             ));
144
-        if (class_exists('QuickAddNewExtension')) $catField->useAddNew('FoxyCartProductCategory', $source);
144
+        if (class_exists('QuickAddNewExtension')) {
145
+            $catField->useAddNew('FoxyCartProductCategory', $source);
146
+        }
145 147
 
146 148
         // Product Images gridfield
147 149
         $config = GridFieldConfig_RelationEditor::create();
148
-        if (class_exists('GridFieldSortableRows')) $config->addComponent(new GridFieldSortableRows('SortOrder'));
150
+        if (class_exists('GridFieldSortableRows')) {
151
+            $config->addComponent(new GridFieldSortableRows('SortOrder'));
152
+        }
149 153
         if (class_exists('GridFieldBulkImageUpload')) {
150 154
             $config->addComponent(new GridFieldBulkUpload());
151 155
             $config->getComponentByType('GridFieldBulkUpload')->setUfConfig('folderName', 'Uploads/ProductImages');
Please login to merge, or discard this patch.
code/objects/OptionItem.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,9 @@
 block discarded – undo
79 79
         $groupField = DropdownField::create('ProductOptionGroupID', _t("OptionItem.Group", "Group"), $groups())
80 80
             ->setEmptyString('')
81 81
             ->setDescription(_t('OptionItem.GroupDescription', 'Name of this group of options. Managed in <a href="admin/settings">Settings > FoxyStripe > Option Groups</a>'));
82
-        if (class_exists('QuickAddNewExtension')) $groupField->useAddNew('OptionGroup', $groups, $groupFields);
82
+        if (class_exists('QuickAddNewExtension')) {
83
+            $groupField->useAddNew('OptionGroup', $groups, $groupFields);
84
+        }
83 85
 
84 86
         $fields->addFieldsToTab('Root.Main', array(
85 87
             HeaderField::create('DetailsHD', _t("OptionItem.DetailsHD", "Product Option Details"), 2),
Please login to merge, or discard this patch.