mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
fix when no enclosingClass can be found (#1239)
In certain situations no enclosingClass can be found, quick fix is to just return then.
This commit is contained in:
@@ -98,6 +98,9 @@ class Macro extends Method
|
||||
$enclosingClass = $this->method->getClosureScopeClass();
|
||||
}
|
||||
|
||||
if (!$enclosingClass) {
|
||||
return;
|
||||
}
|
||||
/** @var \ReflectionMethod $enclosingMethod */
|
||||
$enclosingMethod = Collection::make($enclosingClass->getMethods())
|
||||
->first(function (\ReflectionMethod $method) {
|
||||
|
||||
Reference in New Issue
Block a user