bug #13347 [Console] Helper\TableHelper->addRow optimization (boekkooi)
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] Helper\TableHelper->addRow optimization
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13322
| License | MIT
| Doc PR | -
Commits
-------
9ea59ac
[Console] Helper\Table->addRow optimization
This commit is contained in:
commit
76de7006d5
@ -143,8 +143,9 @@ class TableHelper extends Helper
|
|||||||
{
|
{
|
||||||
$this->rows[] = array_values($row);
|
$this->rows[] = array_values($row);
|
||||||
|
|
||||||
$keys = array_keys($this->rows);
|
end($this->rows);
|
||||||
$rowKey = array_pop($keys);
|
$rowKey = key($this->rows);
|
||||||
|
reset($this->rows);
|
||||||
|
|
||||||
foreach ($row as $key => $cellValue) {
|
foreach ($row as $key => $cellValue) {
|
||||||
if (!strstr($cellValue, "\n")) {
|
if (!strstr($cellValue, "\n")) {
|
||||||
|
Reference in New Issue
Block a user