Completed
Pull Request — 1.0 (#39)
by Matthew
12:49
created
code/extensions/ProductDocCollectionDataExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             $products = $category->Products();
41 41
             $docs = new ArrayList();
42 42
 
43
-            foreach($products as $product) {
43
+            foreach ($products as $product) {
44 44
                 $records = $class::get()->filter(['Products.ID' => $product->ID]);
45 45
                 foreach ($records as $record) {
46 46
                     $docs->push($record);
Please login to merge, or discard this patch.
code/docs/ProductDocDataExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@
 block discarded – undo
47 47
 
48 48
         if ($this->owner->Products()->exists()) {
49 49
             $i = 0;
50
-            foreach($this->owner->Products() as $product) {
50
+            foreach ($this->owner->Products() as $product) {
51 51
                 $list .= $product->Title;
52
-                if(++$i !== $this->owner->Products()->Count()) {
52
+                if (++$i !== $this->owner->Products()->Count()) {
53 53
                     $list .= ", ";
54 54
                 }
55 55
             }
Please login to merge, or discard this patch.
code/dataobjects/CatalogProduct.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@
 block discarded – undo
259 259
     /**
260 260
      * set ParentPage for ViewableDataobject
261 261
      *
262
-     * @return string
262
+     * @return CatalogCategory
263 263
      */
264 264
     public function getParentPage()
265 265
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
      */
171 171
     public function getCMSFields()
172 172
     {
173
-        $this->beforeUpdateCMSFields(function ($fields) {
173
+        $this->beforeUpdateCMSFields(function($fields) {
174 174
             /** @var \FieldList $fields */
175 175
             $remove = [
176 176
                 'Categories',
Please login to merge, or discard this patch.
code/pages/CatalogCategory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function getCMSFields()
30 30
     {
31
-        $this->beforeUpdateCMSFields(function ($fields) {
31
+        $this->beforeUpdateCMSFields(function($fields) {
32 32
             /** @var \FieldList $fields */
33 33
             if ($this->ID) {
34 34
                 // Products
Please login to merge, or discard this patch.