| @@ 76-91 (lines=16) @@ | ||
| 73 | /** |
|
| 74 | * {@inheritdoc} |
|
| 75 | */ |
|
| 76 | public function progress(int $current = 0):IProgressBar |
|
| 77 | { |
|
| 78 | if ($this->isDisabled()) { |
|
| 79 | return $this; |
|
| 80 | } |
|
| 81 | ||
| 82 | if ($current) { |
|
| 83 | $this->progressBar->progress($current); |
|
| 84 | ||
| 85 | return $this; |
|
| 86 | } |
|
| 87 | ||
| 88 | $this->progressBar->progress(); |
|
| 89 | ||
| 90 | return $this; |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * {@inheritdoc} |
|
| @@ 96-106 (lines=11) @@ | ||
| 93 | /** |
|
| 94 | * {@inheritdoc} |
|
| 95 | */ |
|
| 96 | public function end():IProgressBar |
|
| 97 | { |
|
| 98 | if ($this->isDisabled()) { |
|
| 99 | return $this; |
|
| 100 | } |
|
| 101 | ||
| 102 | $this->progressBar->progress($this->total); |
|
| 103 | $this->progressBar->end(); |
|
| 104 | ||
| 105 | return $this; |
|
| 106 | } |
|
| 107 | } |
|
| 108 | ||