2017-06-20 39 views

回答

1

無法將返回類型鏈接到不同的函數返回類型。在phpDocumentor: Defining a 'Type'中沒有提及這種類型,最接近的是callable類型。

你也許可以做到的最好的事情是:

/** 
* As a example I have assumed that $this->Thing->cancel() returns either true or false 
* 
* @see Thing::cancel 
* @return bool Returns the result of Thing::cancel 
*/ 

正如你所看到的,我指定的$this->Thing->cancel()返回類型,並解釋其中的返回類型從起源。爲了方便查找方法,我添加了@see標籤,指向方法

相關問題