Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Code Style - PHPDoc: @param description in same line AND a blank line before the @return-block
Code Style - PHPDoc: @param description in same line AND a blank line before the @return-block [message #1760109] Sat, 22 April 2017 19:30
Tobias Wassermann is currently offline Tobias WassermannFriend
Messages: 2
Registered: April 2017
Junior Member
Hi everyone,

I have a problem with the current PDT 4.3 and can't get our requirement to PHPDoc formatting to work with it.

So in general we want to have a PHPDoc block that looks like that:

/**
* Convert request data to a common format
*
* @param $request Request The request to be handled
*
* @return array
*/


So in general we have defined a (as in my opinion a very common) code style that requires:



  • The description of a parameter must be in the same line as the @param-tag
  • There must be a blank line before the @return-tag


But with the default settings of PDT for PSR-2 I get this:

/**
* Convert request data to a common format
*
* @param $request Request 
*  The request to be handled
* @return array
*/


When changing some options ("new line after @param-tags") I will be able to get the parameters description in the same line as the @param-tag. But never ever I will be able to get a blank line before the @return tag.

So for me there are two questions:


  • Is the label of the option "new line after @param tags" correct? In my opinion the current behavior would lead to an label like "new line after params type"
  • How to ensure the formatter will insert/keep a blank line before the first @return-tag (as we want to use the formatter as save action)


Thanks for your help!

Bye


Tobias
Previous Topic:HTML Tags in PHP Files
Next Topic:Code Style - Format multi line function calls with closing paranthesis on a new line
Goto Forum:
  


Current Time: Sat Jun 23 05:07:02 GMT 2018

Powered by FUDForum. Page generated in 0.01894 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top