From 0c6afd722ddb05e6fe0b8a295876d4190f50db79 Mon Sep 17 00:00:00 2001 From: muchwat_kevin Date: Thu, 5 Dec 2024 10:15:18 +0300 Subject: [PATCH] Update helpers.php Fix PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead --- src/helpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers.php b/src/helpers.php index 5b5c95e..b7da1cd 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -4,7 +4,7 @@ use Akaunting\Money\Money; if (! function_exists('money')) { - function money(mixed $amount, string $currency = null, bool $convert = null): Money + function money(mixed $amount, ?string $currency = null, ?bool $convert = null): Money { if (is_null($currency)) { /** @var string $currency */ @@ -21,7 +21,7 @@ function money(mixed $amount, string $currency = null, bool $convert = null): Mo } if (! function_exists('currency')) { - function currency(string $currency = null): Currency + function currency(?string $currency = null): Currency { if (is_null($currency)) { /** @var string $currency */