@@ -257,7 +257,7 @@ private function renderRowSeparator()
257
257
*/
258
258
private function renderColumnSeparator ()
259
259
{
260
- $ this -> output -> write ( sprintf ($ this ->style ->getBorderFormat (), $ this ->style ->getVerticalBorderChar () ));
260
+ return sprintf ($ this ->style ->getBorderFormat (), $ this ->style ->getVerticalBorderChar ());
261
261
}
262
262
263
263
/**
@@ -274,12 +274,12 @@ private function renderRow(array $row, $cellFormat)
274
274
return ;
275
275
}
276
276
277
- $ this ->renderColumnSeparator ();
277
+ $ rowContent = $ this ->renderColumnSeparator ();
278
278
foreach ($ this ->getRowColumns ($ row ) as $ column ) {
279
- $ this ->renderCell ($ row , $ column , $ cellFormat );
280
- $ this ->renderColumnSeparator ();
279
+ $ rowContent .= $ this ->renderCell ($ row , $ column , $ cellFormat );
280
+ $ rowContent .= $ this ->renderColumnSeparator ();
281
281
}
282
- $ this ->output ->writeln ('' );
282
+ $ this ->output ->writeln ($ rowContent );
283
283
}
284
284
285
285
/**
@@ -306,12 +306,13 @@ private function renderCell(array $row, $column, $cellFormat)
306
306
}
307
307
308
308
if ($ cell instanceof TableSeparator) {
309
- $ this ->output ->write (sprintf ($ this ->style ->getBorderFormat (), str_repeat ($ this ->style ->getHorizontalBorderChar (), $ width )));
310
- } else {
311
- $ width += Helper::strlen ($ cell ) - Helper::strlenWithoutDecoration ($ this ->output ->getFormatter (), $ cell );
312
- $ content = sprintf ($ this ->style ->getCellRowContentFormat (), $ cell );
313
- $ this ->output ->write (sprintf ($ cellFormat , str_pad ($ content , $ width , $ this ->style ->getPaddingChar (), $ this ->style ->getPadType ())));
309
+ return sprintf ($ this ->style ->getBorderFormat (), str_repeat ($ this ->style ->getHorizontalBorderChar (), $ width ));
314
310
}
311
+
312
+ $ width += Helper::strlen ($ cell ) - Helper::strlenWithoutDecoration ($ this ->output ->getFormatter (), $ cell );
313
+ $ content = sprintf ($ this ->style ->getCellRowContentFormat (), $ cell );
314
+
315
+ return sprintf ($ cellFormat , str_pad ($ content , $ width , $ this ->style ->getPaddingChar (), $ this ->style ->getPadType ()));
315
316
}
316
317
317
318
/**
0 commit comments