@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class FS_Test extends FunctionalTest{ |
|
3 | +class FS_Test extends FunctionalTest { |
|
4 | 4 | |
5 | 5 | protected static $fixture_file = 'foxystripe/tests/FoxyStripeTest.yml'; |
6 | 6 | protected static $disable_themes = true; |
7 | 7 | protected static $use_draft_site = false; |
8 | 8 | |
9 | - public function setUp(){ |
|
9 | + public function setUp() { |
|
10 | 10 | parent::setUp(); |
11 | 11 | |
12 | 12 | ini_set('display_errors', 1); |
@@ -14,10 +14,10 @@ discard block |
||
14 | 14 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); |
15 | 15 | } |
16 | 16 | |
17 | - public function logOut(){ |
|
17 | + public function logOut() { |
|
18 | 18 | $this->session()->clear('loggedInAs'); |
19 | 19 | } |
20 | 20 | |
21 | - public function testProductPage(){} |
|
21 | + public function testProductPage() {} |
|
22 | 22 | |
23 | 23 | } |
@@ -123,7 +123,7 @@ |
||
123 | 123 | * Products function. |
124 | 124 | * |
125 | 125 | * @access public |
126 | - * @return array |
|
126 | + * @return PaginatedList |
|
127 | 127 | */ |
128 | 128 | public function ProductList($limit = 10) |
129 | 129 | { |
@@ -129,14 +129,14 @@ discard block |
||
129 | 129 | { |
130 | 130 | $config = SiteConfig::current_site_config(); |
131 | 131 | |
132 | - if ($config->ProductLimit>0) { |
|
132 | + if ($config->ProductLimit > 0) { |
|
133 | 133 | $limit = $config->ProductLimit; |
134 | 134 | } |
135 | 135 | |
136 | 136 | if ($config->MultiGroup) { |
137 | 137 | $entries = $this->Products()->sort('SortOrder'); |
138 | - } else { |
|
139 | - $filter = '"ParentID" = ' . $this->ID; |
|
138 | + }else { |
|
139 | + $filter = '"ParentID" = '.$this->ID; |
|
140 | 140 | |
141 | 141 | // Build a list of all IDs for ProductGroups that are children |
142 | 142 | $holderIDs = $this->ProductGroupIDs(); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | if ($filter) { |
148 | 148 | $filter .= ' OR '; |
149 | 149 | } |
150 | - $filter .= '"ParentID" IN (' . implode(',', $holderIDs) . ")"; |
|
150 | + $filter .= '"ParentID" IN ('.implode(',', $holderIDs).")"; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | $order = '"SiteTree"."Title" ASC'; |