mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Fix issues with parsing invokable macros (#1124)
* Fix issues with parsing invokable macros * Add macro test # Conflicts: # tests/MacroTest.php
This commit is contained in:
+5
-1
@@ -65,7 +65,11 @@ class Macro extends Method
|
||||
|
||||
protected function addLocationToPhpDoc()
|
||||
{
|
||||
$enclosingClass = $this->method->getClosureScopeClass();
|
||||
if ($this->method->name === '__invoke') {
|
||||
$enclosingClass = $this->method->getDeclaringClass();
|
||||
} else {
|
||||
$enclosingClass = $this->method->getClosureScopeClass();
|
||||
}
|
||||
|
||||
/** @var \ReflectionMethod $enclosingMethod */
|
||||
$enclosingMethod = Collection::make($enclosingClass->getMethods())
|
||||
|
||||
Reference in New Issue
Block a user