CS questions
| From: | Lukas Smith | Date: | Sun, 23 Nov 2003 13:21:04 +0000 |
| Subject: | CS questions | ||
| Groups: | php.pear.qa | ||
| Request: | Send a blank email to pear-qa+get-226@lists.php.net to get a copy of this message | ||
Hi,
I) I have a question about how packages install themselves relative to the
pear root dir.
1) Packages like DB install themselves into the pear root dir:
/pear/DB.php
/pear/DB/mysql.php
2) Packages like Liveuser install themselves into a subdir
/pear/LiveUser/LiveUser.php
/pear/Liveuser/Auth/Common.php
However we also have the golden rule that Class names should cleanly map to
Installdirs by mapping "_" to "/".
Now this would imply that 2) is actually a CS violation!
II) I have another questions:
Is a classname like "DB_mysql" allowed? Or should this really be DB_Mysql?
In that case the file should also be called Mysql.php and not mysql.php?
Should we even care?
III) Finally another question:
How about variable names?
We have a few people that use studlyCaps even for variable names.
Other people simply use underscores to separate words. Should be find a
standard here? Should be not even care?
IV) ok now really the last one:
Whatever happened to the CS that true, false and null should be lowercased?
I seem to remember that this was a CS requirement (which I really hate too)
that was featured in the manual. Now that I changed everything for MDB 2.x I
cant seem to find it in the manual anymore.
Regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com
Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin
Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07