| @@ -115,7 +115,7 @@ | ||
| 115 | 115 | $i = 0; | 
| 116 | 116 |              foreach ($this->Categories()->sort('SortOrder') as $category) { | 
| 117 | 117 | $list .= $category->Title; | 
| 118 | -                if(++$i !== $this->Categories()->Count()) { | |
| 118 | +                if (++$i !== $this->Categories()->Count()) { | |
| 119 | 119 | $list .= ", "; | 
| 120 | 120 | } | 
| 121 | 121 | } | 
| @@ -259,7 +259,7 @@ | ||
| 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 |      { | 
| @@ -40,7 +40,7 @@ | ||
| 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); | 
| @@ -47,9 +47,9 @@ | ||
| 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 | } | 
| @@ -112,7 +112,7 @@ discard block | ||
| 112 | 112 | } | 
| 113 | 113 | |
| 114 | 114 | /** | 
| 115 | - * @param null $request | |
| 115 | + * @param null|SS_HTTPRequest $request | |
| 116 | 116 | * | 
| 117 | 117 | * @return DataObject|void | 
| 118 | 118 | * @throws SS_HTTPResponse_Exception | 
| @@ -135,6 +135,7 @@ discard block | ||
| 135 | 135 | |
| 136 | 136 | /** | 
| 137 | 137 | * @param $event | 
| 138 | + * @param DataObject|null $product | |
| 138 | 139 | * | 
| 139 | 140 | * @return $this | 
| 140 | 141 | */ | 
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | public function testCategoryList() | 
| 14 | 14 |      { | 
| 15 | 15 |          $object = $this->objFromFixture('CatalogProduct', 'one'); | 
| 16 | -        $expected = $this->objFromFixture('CatalogCategory', 'default')->Title . ", " . $this->objFromFixture('CatalogCategory', 'two'); | |
| 16 | +        $expected = $this->objFromFixture('CatalogCategory', 'default')->Title.", ".$this->objFromFixture('CatalogCategory', 'two'); | |
| 17 | 17 | $this->assertEquals($expected, $object->CategoryList()); | 
| 18 | 18 | } | 
| 19 | 19 | |