Fixed PHP 8.4 deprecation warning (#1622)

* Fixed PHP 8.4 deprecation warning

* Fix PHP 8.4 deprecation warning
This commit is contained in:
Lito
2024-12-09 16:03:20 +01:00
committed by GitHub
parent 788e72e7dd
commit 5da09fad67
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -1301,10 +1301,11 @@ class ModelsCommand extends Command
* 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(