|
|
@@ -78,10 +78,10 @@ class TableHelper extends Helper
|
|
|
*/
|
|
|
protected function _render($row, $widths, $options = [])
|
|
|
{
|
|
|
- if(empty($rows) || !is_array($row)) {
|
|
|
+ if(!$row || !is_array($row)) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$out = '';
|
|
|
foreach ($row as $i => $column) {
|
|
|
$pad = $widths[$i] - mb_strlen($column);
|
|
|
@@ -102,7 +102,7 @@ class TableHelper extends Helper
|
|
|
*/
|
|
|
public function output($rows)
|
|
|
{
|
|
|
- if(empty($rows) || !is_array($rows)) {
|
|
|
+ if(!$rows || !is_array($rows)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -114,8 +114,8 @@ class TableHelper extends Helper
|
|
|
$this->_render(array_shift($rows), $widths, ['style' => $config['headerStyle']]);
|
|
|
$this->_rowSeparator($widths);
|
|
|
}
|
|
|
-
|
|
|
- if(empty($rows)) {
|
|
|
+
|
|
|
+ if(!$rows) {
|
|
|
return;
|
|
|
}
|
|
|
|