From ce7daf7dfb7d0c27508bfff95a8414e5a0fbb449 Mon Sep 17 00:00:00 2001 From: kakiuchi-shigenao Date: Mon, 14 Jul 2025 22:34:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Option/functions.php=20=E3=81=AE=20PHPDo?= =?UTF-8?q?c=20=E3=82=92=E4=BF=AE=E6=AD=A3=EF=BC=88=E3=81=9F=E3=81=A0?= =?UTF-8?q?=E3=81=97=E3=81=8F=E5=9E=8B=E6=8E=A8=E8=AB=96=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=EF=BC=89=20Fixes=20#45?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Option/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Option/functions.php b/src/Option/functions.php index fbbf28d..77b1404 100644 --- a/src/Option/functions.php +++ b/src/Option/functions.php @@ -36,10 +36,10 @@ function none(): Option\None * It will be a `Some` option containing `$value` if `$value` is different from `$noneValue` (default `null`) * * @template U - * @param U $value + * @param U|null $value * @return Option */ -function fromValue(mixed $value, mixed $noneValue = null, bool $strict = true): Option +function fromValue($value, mixed $noneValue = null, bool $strict = true): Option { $same = $strict ? ($value === $noneValue) @@ -55,7 +55,7 @@ function fromValue(mixed $value, mixed $noneValue = null, bool $strict = true): * It will be a `Some` option containing the result if it is different from `$noneValue` (default `null`). * * @template U - * @param callable():U $callback + * @param callable():U|null $callback * @return Option */ function of(callable $callback, mixed $noneValue = null, bool $strict = true): Option @@ -69,7 +69,7 @@ function of(callable $callback, mixed $noneValue = null, bool $strict = true): O * * @template U * @template E of \Throwable - * @param callable():U $callback + * @param callable():U|null $callback * @param class-string $exceptionClass * @return Option * @throws Throwable