|
@@ -7,7 +7,7 @@ discard block |
|
|
block discarded – undo |
|
7
|
7
|
class Progress { |
|
8
|
8
|
|
|
9
|
9
|
|
|
10
|
|
- public static function showStatus(int $done, int $total, int $size = 30): void { |
|
|
10
|
+ public static function showStatus (int $done, int $total, int $size = 30): void { |
|
11
|
11
|
|
|
12
|
12
|
static $start_time = NULL; |
|
13
|
13
|
|
|
@@ -57,7 +57,7 @@ discard block |
|
|
block discarded – undo |
|
57
|
57
|
} |
|
58
|
58
|
} |
|
59
|
59
|
|
|
60
|
|
- private static function getStatusbar(float $factor, int $size): string { |
|
|
60
|
+ private static function getStatusbar (float $factor, int $size): string { |
|
61
|
61
|
|
|
62
|
62
|
$bar = (int)floor($factor * $size); |
|
63
|
63
|
|
|
@@ -72,12 +72,12 @@ discard block |
|
|
block discarded – undo |
|
72
|
72
|
return $status_bar_pb; |
|
73
|
73
|
} |
|
74
|
74
|
|
|
75
|
|
- private static function getFactor(int $total, int $done): float { |
|
|
75
|
+ private static function getFactor (int $total, int $done): float { |
|
76
|
76
|
|
|
77
|
|
- return (double)(($total === 0) ? 1: ($done / $total)); |
|
|
77
|
+ return (double)(($total === 0) ? 1 : ($done / $total)); |
|
78
|
78
|
} |
|
79
|
79
|
|
|
80
|
|
- private static function getRate(int $seconds, int $done): float { |
|
|
80
|
+ private static function getRate (int $seconds, int $done): float { |
|
81
|
81
|
|
|
82
|
82
|
return (double)(($done === 0) ? 0 : ($seconds / $done)); |
|
83
|
83
|
} |
Please login to merge, or discard this patch.