mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-22 20:13:08 +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();
|
$enclosingClass = $this->method->getClosureScopeClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$enclosingClass) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/** @var \ReflectionMethod $enclosingMethod */
|
/** @var \ReflectionMethod $enclosingMethod */
|
||||||
$enclosingMethod = Collection::make($enclosingClass->getMethods())
|
$enclosingMethod = Collection::make($enclosingClass->getMethods())
|
||||||
->first(function (\ReflectionMethod $method) {
|
->first(function (\ReflectionMethod $method) {
|
||||||
|
|||||||
Reference in New Issue
Block a user