Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0437e3a

Browse files
minor symfony#46300 [Console] Fix CS in Table class after symfony#45565 (GromNaN)
This PR was merged into the 4.4 branch. Discussion ---------- [Console] Fix CS in Table class after symfony#45565 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a Indentation issue introduced by [symfony#45565](https://github.com/symfony/symfony/pull/45565/files#diff-879e34698fd4acc2bbbb1e2c9ca2f0daf8f499a1123e4c0fc58dc68895724a91R760-R764) Commits ------- d3d72ae Fix CS in Console Table after symfony#45565
2 parents fef98bb + d3d72ae commit 0437e3a

File tree

1 file changed

+9
-9
lines changed
  • src/Symfony/Component/Console/Helper

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -763,18 +763,18 @@ private function calculateColumnsWidth(iterable $groups)
763763
continue;
764764
}
765765

766-
foreach ($row as $i => $cell) {
767-
if ($cell instanceof TableCell) {
768-
$textContent = Helper::removeDecoration($this->output->getFormatter(), $cell);
769-
$textLength = Helper::strlen($textContent);
770-
if ($textLength > 0) {
771-
$contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan()));
772-
foreach ($contentColumns as $position => $content) {
773-
$row[$i + $position] = $content;
766+
foreach ($row as $i => $cell) {
767+
if ($cell instanceof TableCell) {
768+
$textContent = Helper::removeDecoration($this->output->getFormatter(), $cell);
769+
$textLength = Helper::strlen($textContent);
770+
if ($textLength > 0) {
771+
$contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan()));
772+
foreach ($contentColumns as $position => $content) {
773+
$row[$i + $position] = $content;
774+
}
774775
}
775776
}
776777
}
777-
}
778778

779779
$lengths[] = $this->getCellWidth($row, $column);
780780
}

0 commit comments

Comments
 (0)