From c9ed532463cdb9c41bd2086eb01fba0209653798 Mon Sep 17 00:00:00 2001 From: Aymane Dara Hlamnach Date: Mon, 26 Aug 2024 11:40:54 +0100 Subject: [PATCH] fix: fix nullable context evaluation --- src/Drivers/Decorator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drivers/Decorator.php b/src/Drivers/Decorator.php index cb9ee59..9fa51d3 100644 --- a/src/Drivers/Decorator.php +++ b/src/Drivers/Decorator.php @@ -125,7 +125,7 @@ protected function canHandleNullContext(callable $resolver): bool $function = new ReflectionFunction(Closure::fromCallable($resolver)); return $function->getNumberOfParameters() === 0 - || $function->getParameters()[0]->hasType() + || !$function->getParameters()[0]->hasType() || $function->getParameters()[0]->getType()->allowsNull(); }