Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when to update the tag @author in PHPdoc? [closed]

Tags:

php

phpdoc

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?

like image 386
wwr Avatar asked Nov 04 '14 14:11

wwr


People also ask

Why must you use PHPDoc syntax to document code?

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.

What are PHPDoc comments?

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.

What is PHPDoc in PhpStorm?

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.


1 Answers

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

like image 93
Styx Avatar answered Oct 19 '22 23:10

Styx