Home » Php » php – when to update the tag @author in PHPdoc?

php – when to update the tag @author in PHPdoc?

Posted by: admin July 12, 2020 Leave a comment


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?

How to&Answers:

phpDocumentor 2 support multiple @author tags:

 * Class User
 * @author Styx
 * @author second author
 * @package Application\Model
class User