Total Complexity | 5 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 5 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
11 | class PercentSpinner extends Spinner |
||
12 | { |
||
13 | protected const INTERVAL = 0.1; |
||
14 | protected const FRAMES = []; |
||
15 | protected const |
||
16 | STYLES = |
||
17 | [ |
||
18 | StylesInterface::SPINNER_STYLES => |
||
19 | [ |
||
20 | StylesInterface::COLOR256 => StylesInterface::DISABLED, |
||
21 | StylesInterface::COLOR => StylesInterface::DISABLED, |
||
22 | ], |
||
23 | ]; |
||
24 | |||
25 | /** {@inheritDoc} */ |
||
26 | 2 | public function spin(?float $percent = null): string |
|
27 | { |
||
28 | 2 | $percent and $this->progress($percent); |
|
29 | 2 | return parent::spin(); |
|
30 | } |
||
31 | |||
32 | /** {@inheritDoc} */ |
||
33 | 2 | public function begin(?float $percent = null): string |
|
36 | } |
||
37 | |||
38 | /** {@inheritDoc} */ |
||
39 | 1 | public function message(?string $message = null, ?int $erasingLength = null): Spinner |
|
42 | } |
||
43 | |||
44 | // /** {@inheritDoc} */ |
||
45 | // public function progress(?float $percent): Spinner |
||
46 | // { |
||
47 | // return $this; |
||
48 | // } |
||
49 | |||
50 | /** {@inheritDoc} */ |
||
51 | 2 | protected function defaultSettings(): Settings |
|
58 |