This is really a newbie question.
I'm trying to improve my skills with PHP, so I'm reading the code of some libraries. I noticed that many PHPdoc headers (is this the right name? I mean this:
/**
* @param $config
* @return bool
* @author developer1
*/
) contain the @author tag.
Let's say that developer2 makes huge changes to developer1's function and then commits to github. Should developer2 update the @author tag?
What's the common practice?
By using PhpDoc, you can make it easy for others (and yourself) to understand your code – weeks, months, and even years after you've written it.
phpDoc blocks are descriptive comments that are part of the application code. They are used to describe the PHP element in the exact location in the code where the element appears. The block consists of a short description, long description, and phpDoc tags.
In PHPDoc comments, PhpStorm supports formatting options in compliance with the ZEND, PEAR, and other coding standards. PHPDoc comments in your source code are available for Quick Documentation Lookup, which helps you get quick information for any documented symbol.
phpDocumentor 2 support multiple @author tags:
/**
* Class User
* @author Styx
* @author second author
* @package Application\Model
*/
class User
{
}
http://www.phpdoc.org/docs/latest/references/phpdoc/tags/author.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With