/**
* Renders table row.
*
* Example:
*
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
*/
private function renderRow(array
$row, string
$cellFormat, string
$firstCellFormat = null
): void
{ $rowContent =
$this->
renderColumnSeparator(self::BORDER_OUTSIDE
);
$columns =
$this->
getRowColumns($row);
$last = \
count($columns) - 1;
foreach ($columns as $i =>
$column) { if ($firstCellFormat && 0 ===
$i) { $rowContent .=
$this->
renderCell($row,
$column,
$firstCellFormat);
} else { $rowContent .=
$this->
renderCell($row,
$column,
$cellFormat);
} $rowContent .=
$this->
renderColumnSeparator($last ===
$i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE
);
} $this->output->
writeln($rowContent);
}