@@ -180,7 +180,7 @@ public function makeColumns($array = [], $columnLimit = 0)
180180
181181 if (count ($ temp ) < $ columnLimit )
182182 {
183- for ($ i = count ($ temp ); $ i < $ columnLimit ; $ i ++)
183+ for ($ i = count ($ temp ); $ i < $ columnLimit ; $ i ++)
184184 {
185185 $ temp [] = ' ' ;
186186 }
@@ -272,7 +272,8 @@ public function setCaption($caption)
272272 /**
273273 * Generate the table
274274 *
275- * @param mixed $tableData
275+ * @param mixed $tableData
276+ *
276277 * @return string
277278 */
278279 public function generate ($ tableData = null )
@@ -307,7 +308,6 @@ public function generate($tableData = null)
307308 }
308309
309310 // Build the table!
310-
311311 $ out = $ this ->template ['table_open ' ] . $ this ->newline ;
312312
313313 // Add any caption here
@@ -345,10 +345,11 @@ public function generate($tableData = null)
345345 $ out .= $ this ->template ['tbody_open ' ] . $ this ->newline ;
346346
347347 $ i = 1 ;
348+
348349 foreach ($ this ->rows as $ row )
349350 {
350351 // We use modulus to alternate the row colors
351- $ name = fmod ($ i ++, 2 ) ? '' : 'alt_ ' ;
352+ $ name = fmod ($ i ++, 2 ) ? '' : 'alt_ ' ;
352353
353354 $ out .= $ this ->template ['row_ ' . $ name . 'start ' ] . $ this ->newline ;
354355
@@ -385,6 +386,8 @@ public function generate($tableData = null)
385386
386387 $ out .= $ this ->template ['row_ ' . $ name . 'end ' ] . $ this ->newline ;
387388 }
389+
390+ $ out .= $ this ->template ['tbody_close ' ] . $ this ->newline ;
388391 }
389392
390393 // Any table footing to display?
@@ -410,8 +413,6 @@ public function generate($tableData = null)
410413 $ out .= $ this ->template ['footing_row_end ' ] . $ this ->newline . $ this ->template ['tfoot_close ' ] . $ this ->newline ;
411414 }
412415
413- $ out .= $ this ->template ['tbody_close ' ] . $ this ->newline ;
414-
415416 // And finally, close off the table
416417 $ out .= $ this ->template ['table_close ' ];
417418
0 commit comments