8000 [Console] add SymfonyStyle::progressIterate() · symfony/symfony@d4af349 · GitHub
[go: up one dir, main page]

Skip to content

Commit d4af349

Browse files
committed
[Console] add SymfonyStyle::progressIterate()
1 parent 7218851 commit d4af349

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,16 @@ public function createProgressBar(int $max = 0)
334334
return $progressBar;
335335
}
336336

337+
/**
338+
* @see ProgressBar::iterate()
339+
*/
340+
public function progressIterate(iterable $iterable, int $max = null): iterable
341+
{
342+
yield from $this->createProgressBar()->iterate($iterable, $max);
343+
344+
$this->newLine(2);
345+
}
346+
337347
/**
338348
* @return mixed
339349
*/

0 commit comments

Comments
 (0)
0