Fix broken table generation

In 2c9922e8af the code was optimised but
the order of method calls was incorrect, leading to several errors in
the test suite.

Not all the tests related to table generation got fixed, but at least
the component is not broken anymore.

Fixes https://github.com/symfony/symfony/issues/26081
This commit is contained in:
Luís Cobucci 2018-02-09 11:36:26 +01:00
parent 89d1b65037
commit 063ca2d708
No known key found for this signature in database
GPG Key ID: EC61C5F01750ED3C

View File

@ -565,7 +565,7 @@ class Table
/**
* Calculates columns widths.
*/
private function calculateColumnsWidth(array $rows)
private function calculateColumnsWidth(iterable $rows)
{
for ($column = 0; $column < $this->numberOfColumns; ++$column) {
$lengths = array();