0
我一直在記錄我的方法在Netbeans的,像這樣:Netbeans的PHPDoc的@return
/**
* Fetches a list of all the task ids that are dependent on the specified task being finished
* before they can be marked as available to work on.
* @param int $taskId - the id of the task we wish to fetch the dependency list for
* @return Array<int> $dependents - array list of tasks dependent on the specified task
* being completed.
*/
public function getDependencyList($taskId)
現在,如果我的方法(用CNTRL-R)中重命名變量$任務id,然後將文檔自動更新。不幸的是,@return屬性並非如此。有沒有辦法啓用這個或我只是簡單地生成我的文檔?
謝謝,你提出了一些好的觀點。我在回報中指定變量的唯一原因是這是以前的公司爲希望編輯該方法的下一位程序員制定的策略。我想這只是不好的做法。 – Programster
@ Stu2000:你可能會這樣說。唯一的情況是,如果方法太長或太複雜,我在看到明確記錄哪個變量保存返回值時看到任何值。 –