minor #26107 [Console] Fix broken table generation (lcobucci)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[Console] Fix broken table generation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes (in an optimisation which is only in `master`)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (partially, at least they don't break badly anymore)
| Fixed tickets | #26081
| License       | MIT

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

Commits
-------

063ca2d Fix broken table generation
This commit is contained in:
Robin Chalas 2018-02-09 13:58:56 +01:00
commit 0733b17c89

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();