| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 10 | 1 | public function __construct( |
|
| 11 | int $iterations = 1000, |
||
| 12 | ?int $progressBarWidth = null |
||
| 13 | ) { |
||
| 14 | 1 | parent::__construct($iterations); |
|
| 15 | 1 | $this->progressBarWidth = $this->advanceSteps = $progressBarWidth ?? $this->advanceSteps; |
|
| 16 | |||
| 17 | $progressAdvance = |
||
| 18 | function (): void { |
||
| 19 | 1 | echo '*'; |
|
| 20 | 1 | }; |
|
| 21 | |||
| 22 | $progressFinish = |
||
| 23 | function (): void { |
||
| 24 | 1 | echo "\e[" . $this->progressBarWidth . 'D'; |
|
| 25 | 1 | echo "\e[K"; |
|
| 26 | 1 | }; |
|
| 27 | |||
| 28 | 1 | $this->showProgressBy(null, $progressAdvance, $progressFinish); |
|
| 29 | 1 | } |
|
| 39 |