From dda63bf8dfe6502bd985ff217d47f913759f4ba0 Mon Sep 17 00:00:00 2001 From: Jeppe Knockaert Date: Mon, 10 Dec 2018 14:13:53 +0100 Subject: [PATCH] bugfix - Do not use the real_name for closures Closures do not have a method name that makes sense to use in the ide_helper file. e.g. Illuminate\Foundation\Providers\{closure} would be the real_name instead of just validate. So for the closure methods, we should just use the provided methodName instead. --- src/Method.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Method.php b/src/Method.php index d0876cf..70b7f14 100644 --- a/src/Method.php +++ b/src/Method.php @@ -47,7 +47,7 @@ class Method $this->method = $method; $this->interfaces = $interfaces; $this->name = $methodName ?: $method->name; - $this->real_name = $method->name; + $this->real_name = $method->isClosure() ? $this->name : $method->name; $this->initClassDefinedProperties($method, $class); //Create a DocBlock and serializer instance