Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable slash command syntax in Doxygen

I've run into a problem with PHP 5.3 namespacing and Doxygen comments.

Example:

/**
 * Sample Method
 *
 * @param string $output
 * @return \Project\Lib\Rest
 */

Doxygen gives me the following warnings:

warning: Found unknown command `\Project'
warning: Found unknown command `\Lib'
warning: Found unknown command `\Rest'

What can I do to fix this or turn off \commands and only use @commands

like image 754
St. John Johnson Avatar asked Feb 21 '12 22:02

St. John Johnson


1 Answers

Try escaping your backslashes, i.e. use

/**
 * Sample Method
 *
 * @param string $output
 * @return \\Project\\Lib\\Rest
 */

\\ is actually a doxygen command which just prints a backslash.

See also Documenting PHP with Doxygen: The Pros and Cons:

/**
 * Sample Method
 *
 * @param string $output
 * @return Project::Lib::Rest
 */
like image 124
Chris Avatar answered Oct 21 '22 09:10

Chris