Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Doc Bug #12211 @inheritdoc not working for child methods & variables
Submitted: 2007-10-09 20:26 UTC
From: ashnazg Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.0)
PHP Version: 5.2.4 OS: GNU/Linux 2.6.9
Roadmaps: 1.4.4    

 [2007-10-09 20:26 UTC] ashnazg (Chuck Burgess)
Description: ------------ The manual says {@inheritdoc} should insert a parent element's docblock into a child's element docblock, be it the child class docblock, a child's variable docblock, or a child's method docblock. However, in practice I only see the child class docblock correctly using the @inheritdoc tag. I cannot get a child's method docblock to insert its parent's same-method docblock, nor a child's variable docblock to insert its parent's same-variable docblock. Further, using the @inheritdoc tag in the child's variable and method docblocks results in a warning: "Warning - {@inheritdoc} can only be used in the docblock of a child class" This implies it can only be used in a class-level docblock. As an aside, the manual page for @inheritdoc also states that PhpDocumentor will attempt to insert parent docblocks into un-docblock'ed child elements without needing to use @inheritdoc. I am _not_ seeing it do this at all, which is why I attempted to use @inheritdoc in the first place.


 [2009-10-12 20:44 UTC] ashnazg (Chuck Burgess)
-Status: Open +Status: Verified -Assigned To: +Assigned To: ashnazg -Roadmap Versions: 1.5.0a1 +Roadmap Versions: 1.4.4
Actually, although the manual mentions *in passing* about usage with child class's members, its example does not show it. Based on this, and the runtime warning plainly stating "{@inheritdoc} can only be used in the docblock of a child class", I believe the manual verbiage is incorrect. I'll update that.
 [2009-10-12 20:50 UTC] ashnazg (Chuck Burgess)
-Status: Verified +Status: Closed -Type: Bug +Type: Documentation Problem
Edited the manual page to show that {@inheritdoc} is only implemented for usage in child class docblocks.