mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Fixed PHP 8.4 deprecation warning (#1622)
* Fixed PHP 8.4 deprecation warning * Fix PHP 8.4 deprecation warning
This commit is contained in:
@@ -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(
|
||||
|
||||
+2
-2
@@ -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 @@ class Generator
|
||||
$config,
|
||||
/* Illuminate\View\Factory */
|
||||
$view,
|
||||
OutputInterface $output = null,
|
||||
?OutputInterface $output = null,
|
||||
$helpers = ''
|
||||
) {
|
||||
$this->config = $config;
|
||||
|
||||
Reference in New Issue
Block a user