And I was wondering what your thoughts on them are.
With a final solution, I can start 'cleaning' them up if need be.
- Should asterixes be indented with a space?
In my opinion: YesCode: Select all
/** * A docblock */
Code: Select all
/** * A docblock */
- Should there be an empty line before the
@return
tag
In my opinion: NoCode: Select all
/** * @param string $string * * @return int */
Code: Select all
/** * @param string $string * @return int */
- Should variables and descriptions be aligned with eachother?
In my opinion: YesCode: Select all
/** * @param string $string Some string description * @param int $number Some number description */
Code: Select all
/** * @param string $string Some string description * @param int $number Some number description */
- Should use statements be added/used?
In my opinion: YesCode: Select all
/** * @throws \phpbb\exception\runtime_exception */
Code: Select all
use phpbb\exception\runetime_exception /** * @throws runtime_exception */
@return
tag. And I feel like this is how a full DocBlock should look:
Code: Select all
/**
* This is a short description of the function,
* just a simple 1-2 liner.
*
* If necessary, this is a longer / more extensive description.
* With multiple lines
* and perhaps even an example of two
*
* @param int $id The identifier
* @param string $title The title
* @param array|false $do_something Whether or not we should do something
* @return void
* @throws runtime_exception
*
* @deprecated 3.3.0 (Removed: 4.0) Instead use something_else, @see \some\class::something_else
*/