Skip to content

Commit

Permalink
[Console] Helper\Table->addRow optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
boekkooi committed Jan 9, 2015
1 parent d5e9de2 commit 9ea59ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Symfony/Component/Console/Helper/TableHelper.php
Expand Up @@ -143,8 +143,9 @@ public function addRow(array $row)
{
$this->rows[] = array_values($row);

$keys = array_keys($this->rows);
$rowKey = array_pop($keys);
end($this->rows);
$rowKey = key($this->rows);
reset($this->rows);

foreach ($row as $key => $cellValue) {
if (!strstr($cellValue, "\n")) {
Expand Down

0 comments on commit 9ea59ac

Please sign in to comment.