File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Filter options
src/Symfony/Component/Console/Style Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Original file line number Diff line number Diff line change @@ -466,7 +466,6 @@ private function createBlock(iterable $messages, string $type = null, string $st
466
466
}
467
467
468
468
// wrap and add newlines for each element
469
- $ messagesLines = [];
470
469
foreach ($ messages as $ key => $ message ) {
471
470
if ($ escape ) {
472
471
$ message = OutputFormatter::escape ($ message );
@@ -476,14 +475,13 @@ private function createBlock(iterable $messages, string $type = null, string $st
476
475
$ messageLineLength = min ($ this ->lineLength - $ prefixLength - $ indentLength + $ decorationLength , $ this ->lineLength );
477
476
$ messageLines = explode (\PHP_EOL , wordwrap ($ message , $ messageLineLength , \PHP_EOL , true ));
478
477
foreach ($ messageLines as $ messageLine ) {
479
- $ messagesLines [] = $ messageLine ;
478
+ $ lines [] = $ messageLine ;
480
479
}
481
480
482
481
if (\count ($ messages ) > 1 && $ key < \count ($ messages ) - 1 ) {
483
- $ messagesLines [] = '' ;
482
+ $ lines [] = '' ;
484
483
}
485
484
}
486
- $ lines = array_merge ($ lines , $ messagesLines );
487
485
488
486
$ firstLineIndex = 0 ;
489
487
if ($ padding && $ this ->isDecorated ()) {
@@ -495,7 +493,7 @@ private function createBlock(iterable $messages, string $type = null, string $st
495
493
foreach ($ lines as $ i => &$ line ) {
496
494
if (null !== $ type ) {
497
495
$ line = $ firstLineIndex === $ i ? $ type .$ line : $ lineIndentation .$ line ;
498
- }
496
+ }
499
497
500
498
$ line = $ prefix .$ line ;
501
499
$ decorationLength = Helper::strlen ($ line ) - Helper::strlenWithoutDecoration ($ this ->getFormatter (), $ line );
You can’t perform that action at this time.
0 commit comments