Browse Source

fixes unit tests, but I need to add some more tests

thinkingmedia 9 years ago
parent
commit
41289edc0c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/Shell/Helper/TableHelper.php

+ 5 - 5
src/Shell/Helper/TableHelper.php

@@ -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;
         }