Eu gosto da documentação do site PHP, então uso algo semelhante nos meus comentários embutidos e na sintaxe do PHPDoc. Veja o exemplo abaixo.
/*
* Finds all the locations where you have access to for this client and returns them in an array .
* @author Radu
* @version 1.0
* @param int $id ( The id of the client for which you're requesting access. )
* @param object $db ( A resource of type Mysql, representing a connection to mysql database, if not supplied the function will connect itself. )
* @return array ( Returns array with id's of locations that you are allowed to see, an empty array if you do not have acces to any locations or returns FALSE and triggers a Warning if any error occuread )
* @use array allowed_locations ( $id [, $db] )
*/
function allowed_locations($id, $db=NULL){ ... }
E, como o @Larry Coleman disse, os comentários incorporados devem dizer por que você fez algum código.
$funcResult = SomeFunction();
if(is_array($funcResult))
{ //Beacause SomeFunction() could return NULL, and count(NULL) = 1
$c = count($funcResult);
} else {
$c = 0;
}
if($c == 1)
{
...
}else
{
...
}