Tuesday 01 January 2008 3:36:19 am
Hello everyone in 2008! Few questions concerning PHP coding standard:
1) Is there an up-to-date standard description available anywhere? I have just found this: http://ez.no/ezpublish/documentation/development/standards/php 2) There are two formatting problems that I have when I try to follow the coding style observed in the core eZ Publish PHP files, both in regard to indentation. Eclipse comes with this great formatting tool, but it doesn't seem to obey custom indentation (this is mainly problematic with large array declarations). The other one occurs when ommiting brackets in single-line if statements: <?php
// automatic formatting works great for brackets:
if( $x )
{
echo $y;
}
// but destroys indentation when brackets are missing:
else
echo $z; // this line should be indented, I think...
?>
Any suggestions?
Thanks, Piotrek
--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu
|