| 1 | <?php |
||
| 9 | class TaskProgressCalculator |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | private $totalSteps; |
||
| 15 | |||
| 16 | /** @var float */ |
||
| 17 | private $startTime; |
||
| 18 | |||
| 19 | private $step = 0; |
||
| 20 | |||
| 21 | 2 | public function __construct( |
|
| 29 | |||
| 30 | 2 | public function setStartTime(float $startTime) |
|
| 34 | |||
| 35 | 2 | public function increment() |
|
| 39 | |||
| 40 | 2 | public function getTotalSteps(): int |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return int |
||
| 47 | */ |
||
| 48 | 2 | public function getStep(): int |
|
| 52 | |||
| 53 | 2 | public function calculateSpeed() |
|
| 57 | |||
| 58 | 2 | public function calculateEta() |
|
| 62 | } |