mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-03-16 22:34:56 +01:00
Add explicit cast to ArcanistUnitConsoleRenderer unit test
Summary: D25848 was incomplete. `$seconds` itself is not an int but a float. Thus explicitly also cast `$seconds` to int to avoid an error in PHP 8.1 and later. Test Plan: Run `bin/arc unit --everything` Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Tags: #arcanist Differential Revision: https://we.phorge.it/D25856
This commit is contained in:
parent
f0176263a7
commit
ec68f53ba2
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ final class ArcanistUnitConsoleRenderer extends ArcanistUnitRenderer {
|
|||
private function formatTime($seconds) {
|
||||
if ($seconds >= 60) {
|
||||
$minutes = (int)floor($seconds / 60);
|
||||
return pht('%dm%02ds', $minutes, round($seconds % 60));
|
||||
return pht('%dm%02ds', $minutes, round((int)$seconds % 60));
|
||||
}
|
||||
|
||||
if ($seconds >= 1) {
|
||||
|
|
Loading…
Add table
Reference in a new issue