Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple @todo in phpDoc

Tags:

phpdoc

todo

I have multiple todo items I want to add for a function.

What is the correct way to add them in a phpDoc comment block?

I understand that I should use the @todo tag. But I am unsure of whether I should use a single @todo tag per item, or one @todo tag for the whole list.

like image 478
accord_guy Avatar asked Apr 09 '26 00:04

accord_guy


1 Answers

Zero or more @todo tags is valid.

PSR-5: PHPDoc

Syntax

@todo [description]

Example

/**
 * Counts the number of items in the provided array.
 *
 * @todo add an array parameter to count
 *
 * @return int Returns the number of elements.
 */
function count()
{
    <...>
}
like image 178
Gerard Roche Avatar answered Apr 17 '26 21:04

Gerard Roche



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!