From 2ebb172f2e3f5e52fb87b0bc594c927d3f1625fb Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 28 Nov 2021 00:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BE=D1=87=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=BA=D0=BE=D0=BD=D0=B2=D0=B5=D1=80=D1=82=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=B4=D0=B5=D0=BD=D0=B5=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Helpers.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Helpers.php b/src/Helpers.php index 5a02b8b..6275a5d 100644 --- a/src/Helpers.php +++ b/src/Helpers.php @@ -17,12 +17,12 @@ final class Helpers /** * Конвертирует копейки в рубли, оставляя только 2 знака после запятой * - * @param int|null $kopeks Копейки + * @param float|null $kopeks Копейки * @return float Рубли */ - public static function KopToRub(?int $kopeks): float + public static function toRub(?float $kopeks): float { - return round(abs((int)$kopeks) / 100, 2); + return round(abs((float)$kopeks) / 100, 2); } /** @@ -31,7 +31,7 @@ final class Helpers * @param float|null $rubles Рубли * @return int Копейки */ - public static function RubToKop(?float $rubles): int + public static function toKop(?float $rubles): int { return (int)round(abs((float)$rubles) * 100, 2); }