Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
9 | class ProgressJuggler implements JugglerInterface |
||
10 | { |
||
11 | /** @var float */ |
||
12 | protected $progress; |
||
13 | /** @var string */ |
||
14 | protected $percentSpacer = Defaults::ONE_SPACE_SYMBOL; |
||
15 | /** @var string */ |
||
16 | protected $currentFrame; |
||
17 | |||
18 | 8 | public function __construct(float $percent) |
|
19 | { |
||
20 | 8 | $this->update($percent); |
|
21 | 8 | } |
|
22 | |||
23 | 7 | public function setProgress(float $percent): void |
|
24 | { |
||
25 | 7 | $this->update($percent); |
|
26 | 7 | } |
|
27 | |||
28 | 8 | public function getFrame(): string |
|
29 | { |
||
30 | 8 | return $this->currentFrame; |
|
31 | } |
||
32 | |||
33 | 8 | public function getFrameErasingLength(): int |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param float $percent |
||
41 | */ |
||
42 | 8 | protected function update(float $percent): void |
|
46 | 8 | } |
|
47 | } |
||
48 |