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