Skip to content

Commit 9ea59ac

Browse files
committed
[Console] Helper\Table->addRow optimization
1 parent d5e9de2 commit 9ea59ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Component/Console/Helper/TableHelper.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ public function addRow(array $row)
143143
{
144144
$this->rows[] = array_values($row);
145145

146-
$keys = array_keys($this->rows);
147-
$rowKey = array_pop($keys);
146+
end($this->rows);
147+
$rowKey = key($this->rows);
148+
reset($this->rows);
148149

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

0 commit comments

Comments
 (0)