Computing Magazine

Adding Correct phpDoc

Posted on the 21 June 2012 by Akahgy

Description:

Each class or method should include the php documentation at the beginning of the definition.

Solution:

The average phpDoc for a PhP class should contain the following information:

/**
* Short description of the class/method
* Long description of the class/method
* @author First name Last name <[email protected]>
* @since Start date
* @see Wiki documentation link
* @package Name of the container module
* @param Type Name Description
* @return Type Name
*/

Of course, for methods inside a class, redundant information should be excluded.


Back to Featured Articles on Logo Paperblog