@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | See README.md for a worked example |
10 | 10 | |
11 | 11 | */ |
12 | - public function SplitDataListIntoGridRows($itemsInGridMethod,$numberOfCols) { |
|
12 | + public function SplitDataListIntoGridRows($itemsInGridMethod, $numberOfCols) { |
|
13 | 13 | $itemsInGrid = $this->owner->$itemsInGridMethod(); |
14 | - return $this->createGrid($itemsInGrid,$numberOfCols); |
|
14 | + return $this->createGrid($itemsInGrid, $numberOfCols); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | /* |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | See README.md for a worked example |
22 | 22 | |
23 | 23 | */ |
24 | - public function SplitClassNameDataListIntoGridRows($className,$numberOfCols,$limit,$sort='LastEdited DESC') { |
|
24 | + public function SplitClassNameDataListIntoGridRows($className, $numberOfCols, $limit, $sort = 'LastEdited DESC') { |
|
25 | 25 | $clazz = Injector::inst()->create($className); |
26 | 26 | $itemsInGrid = $clazz->get()->limit($limit)->sort($sort); |
27 | - return $this->createGrid($itemsInGrid,$numberOfCols); |
|
27 | + return $this->createGrid($itemsInGrid, $numberOfCols); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | 31 | /* |
32 | 32 | The actual method that splits the DataList into an ArrayList of rows that contain an ArrayList of Columns |
33 | 33 | */ |
34 | - private function createGrid($itemsInGrid,$numberOfCols) { |
|
34 | + private function createGrid($itemsInGrid, $numberOfCols) { |
|
35 | 35 | $position = 1; |
36 | 36 | $columns = new ArrayList(); |
37 | 37 | $result = new ArrayList(); |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | class GridRowsExtensionTest extends SapphireTest { |
4 | - public function testSplitDataListIntoGridRows() { |
|
5 | - $this->markTestSkipped('TODO'); |
|
6 | - } |
|
4 | + public function testSplitDataListIntoGridRows() { |
|
5 | + $this->markTestSkipped('TODO'); |
|
6 | + } |
|
7 | 7 | |
8 | - public function testSplitClassNameDataListIntoGridRows() { |
|
9 | - $this->markTestSkipped('TODO'); |
|
10 | - } |
|
8 | + public function testSplitClassNameDataListIntoGridRows() { |
|
9 | + $this->markTestSkipped('TODO'); |
|
10 | + } |
|
11 | 11 | |
12 | - public function testCreateGrid() { |
|
13 | - $this->markTestSkipped('TODO'); |
|
14 | - } |
|
12 | + public function testCreateGrid() { |
|
13 | + $this->markTestSkipped('TODO'); |
|
14 | + } |
|
15 | 15 | |
16 | 16 | } |