PhpStorm displays your own code documentation in the code assist. But what if you wanted to create a separate documentation you can hand out or integrate into your website? Then you should use phpDocumentor. You can configure and run phpDocumentor directly from PhpStorm as an external tool. Here is what you have to do:
File -> Settings -> Select External Tools -> Add…
Provide the following data:
This name will show up in your Tools Menu. If you fill in a group such as PHP, then the entry will become a submenu of PHP.
Fill in the path to your PHP executable, e.g. C:Program FilesPHPphp.exe
Parameters: phpdoc -d “<pathToSourceDirectory>” -t “<pathToDestinationDirectory>” -o HTML:Smarty:PHP
The source directory is the one you want to document, e.g. where your php files reside in. The destination directory is where you want the documentation to be created in. Please note, that paths are given without th a trailing slash and in case your paths contain spaces it is important to enclose the parameter in quotes. For more information about the parameters see the phpDocumentor tutorial.
Working Directory: <pathToPhpDocumentor>
Fill in the path to your phpDocumentor directory, e.g. “C:\Documents and Settings\Speich\My Documents\Website Tools\PhpDocumentor”