Make XLSX reader return Row objects

This commit is contained in:
Adrien Loison committed 2017-11-18 20:53:22 +01:00
1 parent a665b974fa
commit 78b6639480
12 files changed
+272 -96

No files matched your search

@@ -22,15 +22,19 @@ class RowManager
/**
* Detect whether a row is considered empty.
* An empty row has either no cells at all - or only one empty cell
* An empty row has all of its cells empty.
*
* @param Row $row
* @return bool
*/
public function isEmpty(Row $row)
{
$cells = $row->getCells();
foreach ($row->getCells() as $cell) {
if (!$cell->isEmpty()) {
return false;
}
}
return count($cells) === 0 || (count($cells) === 1 && $cells[0]->isEmpty());
return true;
}
}