S
S
simpfc2015-10-02 15:10:26
phpDocumentor
simpfc, 2015-10-02 15:10:26

How to specify that doc-block should be inherited from the parent class method?

I can't figure out how to tell phpDocumentor to inherit the dock-block method of the parent class.
Yii sources contain the @inheritdoc tag.

/**
     * @inheritdoc
     */
    public static function populateRecord($record, $row)
    {
        // ..code
    }

I try it, all it does is add to the documentation next to the method in detail - " Tags inheritdoc " Read
0c3d91920b1f499b9ef71d50cba331bc.jpg
for this tag here in the dock - www.phpdoc.org/docs/latest/guides/inheritance.html
I try to use it as inline tag ( {@inheritDoc} and {@inheritdoc} )
I get this.
798d08cf548649fca7569f1a3299e6a4.jpg
If I understand correctly, in general, dock blocks should be inherited automatically, according to the documentation, and the inheritdoc tag is used to explicitly indicate.
But I didn’t manage to use dock block inheritance for overridden methods. And I've run out of ideas about what's going on.
UPD
Hierarchy of classes
5f0316f10d5849d09dfcc135a8673663.jpg
It is strange that the ActiveRecord::transactions() method inherits the description, but hereModel::scenarios() no longer inherits, maybe the thing is that it is much higher in the hierarchy?
6ca3b16ac40f415eb1452395787e01a9.jpg69bcaf5220bc46bd8b11652aacf914b2.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2015-10-02
@SilenceOfWinter

Check whether it is implemented at all - place both classes in 1 file, if it works, then the documenter simply "does not see" the parent class.

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question