PHPdoc: Documenting a chain of methods?

How to properly use PHPdoc to document labels in a class, as shown in the example below - what is proper use?

class myClass { /** * @return myClass */ function one() { return $this; } /** * @return self */ function two() { return $this; } /** * @return $this */ function three() { return $this; } } 
+6
source share
2 answers
 /** * @return myClass */ 

I am not an expert phpDoc, but how do they do it in the framework of Zend. Therefore, I find it reliable

+6
source

I prefer

 /** * @return $this */ 
0
source

Source: https://habr.com/ru/post/895844/


All Articles