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

Skip to content

Commit e420814

Browse files
committed
[Console] add SymfonyStyle::progressIterate()
1 parent bf007a8 commit e420814

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

+10
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,16 @@ public function createProgressBar(int $max = 0)
335335
return $progressBar;
336336
}
337337

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

0 commit comments

Comments
 (0)
0