Completed
Push — master ( 4d2deb...241a00 )
by Gordon
13:29
created
code/GridRowsExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
tests/GridRowsExtensionTest.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.