From 1b608fc44697e79e20ef060bc679ec5b519362cb Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Mon, 11 Aug 2014 13:26:11 +0200 Subject: [PATCH] Get correct namespace The other one was empty, now it should be correct. Fixes #97 --- src/Method.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Method.php b/src/Method.php index 177029a..4b8ef12 100644 --- a/src/Method.php +++ b/src/Method.php @@ -297,7 +297,9 @@ class Method $method = $reflectionMethod->getPrototype(); } if ($method) { - $phpdoc = new DocBlock($method, new Context($method->getNamespaceName())); + $namespace = $method->getDeclaringClass()->getNamespaceName(); + $phpdoc = new DocBlock($method, new Context($namespace)); + if (strpos($phpdoc->getText(), '{@inheritdoc}') !== false) { //Not at the end yet, try another parent/interface.. return $this->getInheritDoc($method);