Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff051ea

Browse filesBrowse files
committed
Simplify.
1 parent 217e57d commit ff051ea
Copy full SHA for ff051ea

File tree

Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed

‎src/Symfony/Component/Console/Style/SymfonyStyle.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Style/SymfonyStyle.php
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ private function createBlock(iterable $messages, string $type = null, string $st
466466
}
467467

468468
// wrap and add newlines for each element
469-
$messagesLines = [];
470469
foreach ($messages as $key => $message) {
471470
if ($escape) {
472471
$message = OutputFormatter::escape($message);
@@ -476,14 +475,13 @@ private function createBlock(iterable $messages, string $type = null, string $st
476475
$messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength);
477476
$messageLines = explode(\PHP_EOL, wordwrap($message, $messageLineLength, \PHP_EOL, true));
478477
foreach ($messageLines as $messageLine) {
479-
$messagesLines[] = $messageLine;
478+
$lines[] = $messageLine;
480479
}
481480

482481
if (\count($messages) > 1 && $key < \count($messages) - 1) {
483-
$messagesLines[] = '';
482+
$lines[] = '';
484483
}
485484
}
486-
$lines = array_merge($lines, $messagesLines);
487485

488486
$firstLineIndex = 0;
489487
if ($padding && $this->isDecorated()) {
@@ -495,7 +493,7 @@ private function createBlock(iterable $messages, string $type = null, string $st
495493
foreach ($lines as $i => &$line) {
496494
if (null !== $type) {
497495
$line = $firstLineIndex === $i ? $type.$line : $lineIndentation.$line;
498-
}
496+
}
499497

500498
$line = $prefix.$line;
501499
$decorationLength = Helper::strlen($line) - Helper::strlenWithoutDecoration($this->getFormatter(), $line);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.