PhpDocumentor how to avoid * in front of each new comment line
According to PhpDocumntor each block of comment in order to be converted into a valid piece of documentation requires to be encapsulated like this:
/**
* This function is used blah, blah, blah
* line 2
* line 2
* ...
*/
function MyFunc($string) {...
Do you know if it's possible (maybe by changing some settings) to avoid being forced to place an asterisk in front of each line. I would basically like PhpDocumentor to accept and translate to documentation these type of comments:
/**
This function is used blah, blah, blah
line 2
line 2
...
*/
function MyFunc($string) {...
I'm asking because JsDOC and JavaDoc do not require a damn asterisk in front of each new line anymore, so I thought tat maybe also PhpDocumentor can do this by tricking a bit its se开发者_Python百科ttings, but I can't find anything about this on Google.
Maybe you should use an editor which places the asterisks for you, so you don't have to do it manually. Almost all PHP-compatible IDEs do it, as do many programmer's editors with PHP support.
Using the asterisk like that is the standard convention. Unless your code is going to be hidden away in a cave, under a ton of cement, where nobody will ever see it, it might be a good idea to follow the standard conventions.
You have to remember if you change the way PhpDoc creates the documentation / auto complete information, the end user will need to change their settings as well should they wish to view your code with documentation / auto complete information.
I am not aware of this option in PhpDoc however you could try playing with the DocBlock templates.
Here is a link on playing with the doc block templates.
There is no way to do it using PhpDocumentor.
I gave up on PhpDocumentor and started using Doxygen. For anyone who might be interested, Doxygen allows final user to document PHP function in many ways among which also like JavaDoc and JsDoc. And you are NOT forced to place a 'damn' asterisk at the beginning of each line in documentation, so the following comments are ok and will be properly parsed by Doxygen:
/**
... line1 ...
... line2 ...
*/
function MyFunc($string) {...
精彩评论