branch: externals/phpinspect
commit 4c2b3dd601bb4775a99a3d28056bb377bf50140b
Author: Hugo Thunnissen <[email protected]>
Commit: Hugo Thunnissen <[email protected]>
Only attempt to return the inside class name when it is non-nil
---
phpinspect.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/phpinspect.el b/phpinspect.el
index 5705221fd5..eeb6bc2557 100644
--- a/phpinspect.el
+++ b/phpinspect.el
@@ -1487,11 +1487,10 @@ resolve types of function argument variables."
(phpinspect--real-type
types
namespace
- (if (or (string= type "self") (string= type "static"))
+ (if (and inside-class-name (or (string= type "self") (string= type
"static")))
(progn
(phpinspect--log "Returning inside class name for %s : %s"
type inside-class-name)
-
inside-class-name)
;; else
type)))))