From 48624853250bb5442f9b63fdaec382f11cf563f6 Mon Sep 17 00:00:00 2001 From: Lito Date: Fri, 29 Nov 2024 12:34:35 +0100 Subject: [PATCH 1/2] Fixed PHP 8.4 deprecation warning --- src/Console/ModelsCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 7b212941e..e5173ffa6 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -1301,10 +1301,11 @@ protected function getCommentFromDocBlock(\ReflectionMethod $reflection) * Get method return type based on it DocBlock comment * * @param \ReflectionMethod $reflection + * @param ?\Reflector $reflectorForContext * * @return null|string */ - protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection, \Reflector $reflectorForContext = null) + protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection, ?\Reflector $reflectorForContext = null) { $phpDocContext = (new ContextFactory())->createFromReflector($reflectorForContext ?? $reflection); $context = new Context( From ec2527246293610cc64043ff9373d2bb3da3c987 Mon Sep 17 00:00:00 2001 From: Lito Date: Fri, 29 Nov 2024 12:45:53 +0100 Subject: [PATCH 2/2] Fix PHP 8.4 deprecation warning --- src/Generator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator.php b/src/Generator.php index a509958d2..1fcdbba26 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -42,7 +42,7 @@ class Generator /** * @param \Illuminate\Config\Repository $config * @param \Illuminate\View\Factory $view - * @param OutputInterface $output + * @param ?OutputInterface $output * @param string $helpers */ public function __construct( @@ -50,7 +50,7 @@ public function __construct( $config, /* Illuminate\View\Factory */ $view, - OutputInterface $output = null, + ?OutputInterface $output = null, $helpers = '' ) { $this->config = $config;