From abda70208340f4869a9b725658bf38e64ccd4e0a Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Thu, 5 Dec 2024 19:04:21 +0100 Subject: [PATCH] Fix PhabricatorAuthInviteTestCase::testDuplicateInvite unit test Summary: Explicitly cast `$minutes` to int to avoid an error in PHP 8.1 and later. ``` ERROR 8192: Implicit conversion from float to int loses precision at [/var/www/html/phorge/arcanist/src/unit/renderer/ArcanistUnitConsoleRenderer.php:86] ``` Closes T15968 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 Maniphest Tasks: T15968 Differential Revision: https://we.phorge.it/D25848 --- src/unit/renderer/ArcanistUnitConsoleRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unit/renderer/ArcanistUnitConsoleRenderer.php b/src/unit/renderer/ArcanistUnitConsoleRenderer.php index 48a1d96f..97f4850e 100644 --- a/src/unit/renderer/ArcanistUnitConsoleRenderer.php +++ b/src/unit/renderer/ArcanistUnitConsoleRenderer.php @@ -82,7 +82,7 @@ final class ArcanistUnitConsoleRenderer extends ArcanistUnitRenderer { private function formatTime($seconds) { if ($seconds >= 60) { - $minutes = floor($seconds / 60); + $minutes = (int)floor($seconds / 60); return pht('%dm%02ds', $minutes, round($seconds % 60)); }