@@ -94,6 +94,10 @@ |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
| 97 | + /** |
|
| 98 | + * @param integer $maxWidth |
|
| 99 | + * @param integer $amount |
|
| 100 | + */ |
|
| 97 | 101 | private function checkGrid($grid, $maxWidth, $amount) |
| 98 | 102 | { |
| 99 | 103 | $items = 0; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | public function testSplitDataListMethodDoesNotExist() |
| 22 | 22 | { |
| 23 | 23 | $message = 'Method not found. A grid cannot be formed from the method' |
| 24 | - . ' GridRowItemsTHISMETHODDOESNOTEXIST'; |
|
| 24 | + . ' GridRowItemsTHISMETHODDOESNOTEXIST'; |
|
| 25 | 25 | $this->setExpectedException('InvalidArgumentException', $message); |
| 26 | 26 | |
| 27 | 27 | $page = $this->objFromFixture('GridRowItemPageTO', 'page001'); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $controller = new GridRowItemPageTO_Controller(); |
| 30 | 30 | $controller->setDataModel($page); |
| 31 | 31 | |
| 32 | - for ($columns=1; $columns < 15; $columns++) { |
|
| 32 | + for ($columns = 1; $columns < 15; $columns++) { |
|
| 33 | 33 | $grid = $controller->SplitDataListIntoGridRows( |
| 34 | 34 | 'GridRowItemsTHISMETHODDOESNOTEXIST', // method from model |
| 35 | 35 | $columns |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $controller = new GridRowItemPageTO_Controller(); |
| 46 | 46 | $controller->setDataModel($page); |
| 47 | 47 | |
| 48 | - for ($columns=1; $columns < 15; $columns++) { |
|
| 48 | + for ($columns = 1; $columns < 15; $columns++) { |
|
| 49 | 49 | $grid = $controller->SplitDataListIntoGridRows( |
| 50 | 50 | 'GridRowItems', // method from model |
| 51 | 51 | $columns |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $page->doPublish(); |
| 61 | 61 | $controller = new GridRowItemPageTO_Controller(); |
| 62 | 62 | $controller->setDataModel($page); |
| 63 | - for ($columns=1; $columns < 15; $columns++) { |
|
| 63 | + for ($columns = 1; $columns < 15; $columns++) { |
|
| 64 | 64 | $grid = $controller->SplitDataListIntoGridRows( |
| 65 | 65 | 'GridItems', // method from controller |
| 66 | 66 | $columns |
@@ -79,15 +79,15 @@ discard block |
||
| 79 | 79 | $page->doPublish(); |
| 80 | 80 | $controller = new Page_Controller(); |
| 81 | 81 | $controller->setDataModel($page); |
| 82 | - for ($columns=1; $columns < 15; $columns++) { |
|
| 83 | - for ($i=1; $i < 15; $i++) { |
|
| 82 | + for ($columns = 1; $columns < 15; $columns++) { |
|
| 83 | + for ($i = 1; $i < 15; $i++) { |
|
| 84 | 84 | $grid = $controller->SplitClassNameDataListIntoGridRows( |
| 85 | 85 | 'GridRowItemTO', |
| 86 | 86 | $columns, |
| 87 | 87 | $i, |
| 88 | 88 | $sort = 'LastEdited DESC' |
| 89 | 89 | ); |
| 90 | - $amount = $i > 12 ? 12: $i; |
|
| 90 | + $amount = $i > 12 ? 12 : $i; |
|
| 91 | 91 | $this->checkGrid($grid, $columns, $amount); |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | if ($itemsInGrid == null) { |
| 34 | 34 | $message = 'Method not found. A grid cannot be formed from the ' |
| 35 | - . 'method ' . $itemsInGridMethod; |
|
| 35 | + . 'method ' . $itemsInGridMethod; |
|
| 36 | 36 | throw new InvalidArgumentException($message); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | if ($itemsInGrid == null) { |
| 34 | 34 | $message = 'Method not found. A grid cannot be formed from the ' |
| 35 | - . 'method ' . $itemsInGridMethod; |
|
| 35 | + . 'method '.$itemsInGridMethod; |
|
| 36 | 36 | throw new InvalidArgumentException($message); |
| 37 | 37 | } |
| 38 | 38 | |