Re: PHP_CodeSniffer and constant alignement

From: Date: Sun, 25 Nov 2007 15:19:51 +0000
Subject: Re: PHP_CodeSniffer and constant alignement
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48586@lists.php.net to get a copy of this message
Christian Weiske a écrit :
Laurent.
33: define('PEAR_PACKAGEUPDATE_PREF_NOUPDATES', 0); 34: define('PEAR_PACKAGEUPDATE_PREF_NEXTRELEASE', 1);
35: define('PEAR_PACKAGEUPDATE_PREF_TYPE',        2);
36: define('PEAR_PACKAGEUPDATE_PREF_STATE',       3);
Since you should add a comment for each of the constants, you don't need to align them at all. Of course Christian
For PEAR_PackageUpdate it's ok, but if I used DocBlock phpDocumentor [1] support (remember my previous post) See HTML_Progress2 for example , with constant and a single comment for all constants : Should I keep space alignement or not ? /**#@+ * Progress Bar shape types *
 * @var        integer
 * @since      2.0.0
*/ define ('HTML_PROGRESS2_BAR_HORIZONTAL', 1); define ('HTML_PROGRESS2_BAR_VERTICAL', 2);
define ('HTML_PROGRESS2_POLYGONAL',      3);
define ('HTML_PROGRESS2_CIRCLE',         4);
/**#@-*/ [1] http://manual.phpdoc.org/HTMLframesConverter/phpdoc.de/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate

« previous php.pear.dev (#48586) next »