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.
This commit is contained in:
Jeppe Knockaert
2018-12-10 14:14:34 +01:00
parent 858e730c00
commit dda63bf8df
+1 -1
View File
@@ -47,7 +47,7 @@ class Method
$this->method = $method; $this->method = $method;
$this->interfaces = $interfaces; $this->interfaces = $interfaces;
$this->name = $methodName ?: $method->name; $this->name = $methodName ?: $method->name;
$this->real_name = $method->name; $this->real_name = $method->isClosure() ? $this->name : $method->name;
$this->initClassDefinedProperties($method, $class); $this->initClassDefinedProperties($method, $class);
//Create a DocBlock and serializer instance //Create a DocBlock and serializer instance