Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add documentation for my functions in Netbeans PHP?

I tried the following,

/*  * addRelationship  *  * Adds a relationship between two entities using the given relation type.  *  * @param fromKey the original entity  * @param toKey the referring entity  * @param relationTypeDesc the type of relationship  */  function addRelationship($fromKey, $toKey, $relationTypeDesc) {     $relationTypeKey = $this->getRelationTypeKey($relationTypeDesc); 

But, when I tried to use it in another place, it says PHPDoc not found.

alt text

Any Ideas on how to get this to work in NetBeans PHP?

UPDATE :

The following is the updated syntax which will work in NetBeans PHP -

/**   * addRelationship  *  * Adds a relationship between two entities using the given relation type.  *  * @param integer $fromKey the original entity  * @param integet $toKey the referring entity  * @param string $relationTypeDesc the type of relationship  */  function addRelationship($fromKey, $toKey, $relationTypeDesc) { 
like image 485
Lenin Raj Rajasekaran Avatar asked Dec 05 '10 20:12

Lenin Raj Rajasekaran


1 Answers

You are missing an asterisk * in the first line: Try

/**  * addRelationship  *  * Adds a relationship between two entities using the given relation type.  *  * @param fromKey the original entity  * @param toKey the referring entity  * @param relationTypeDesc the type of relationship  */ 
like image 151
Pekka Avatar answered Oct 09 '22 01:10

Pekka