Re: cvs: pear /Auth_PrefManager2 PrefManager2.php
| From: | Daniel Convissor | Date: | Tue, 29 Jun 2004 04:03:36 +0000 |
| Subject: | Re: cvs: pear /Auth_PrefManager2 PrefManager2.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-21236@lists.php.net to get a copy of this message | ||
Hi Jon:
Excellent job with the coding standards. There are a few minor touch ups
that will be good, please...
On Tue, Jun 29, 2004 at 02:59:32AM -0000, Jon Wood wrote:
> jellybob Mon Jun 28 22:59:32 2004 EDT
> Added files:
> /pear/Auth_PrefManager2 PrefManager2.php
> require_once('PEAR/ErrorStack.php');
Throw in a docblock for that.
> /**
> * Error codes
> */
> define('AUTH_PREFMANAGER2_CONTAINER_NOT_FOUND', -1);
> define('AUTH_PREFMANAGER2_NOT_IMPLEMENTED', -2);
That docblock will only be acquired by the first define. But, you can use
phpDocumentor's "templating" functionality like this in order to get that
comment to populate everything in a given range...
/**#@+
* Error codes
*/
define('AUTH_PREFMANAGER2_CONTAINER_NOT_FOUND', -1);
define('AUTH_PREFMANAGER2_NOT_IMPLEMENTED', -2);
/**#@-*/
> /**
> * Constructor
> * Applications should never call this constructor directly, instead create a container
> * with the factory method.
In order to _ensure_ phpDocumentor breaks things up correclty into
paragraphs, it's important to insert blank lines between each paragraph.
Plus for reading the comments in the source code, line wrapping at 80
columns is very helpful. So, whip it out like this:
/**
* Constructor
*
* Applications should never call this constructor directly, instead
* create a container with the factory method.
Finally, put the @access after the @return so we can look in the same
place in each package to find the value. Similarly, put @static after
@access.
> if (!isset($options['default_user'])) $options['default_user'] =
> 'default';
The CS calls for making control structures bracketed and nested:
if (!isset($options['default_user'])) {
$options['default_user'] = 'default';
}
Thanks very much,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409