[PEPr] +1 for Web Services::Services_Hatena
| From: | Justin Patrin | Date: | Wed, 08 Mar 2006 15:54:08 +0000 |
| Subject: | [PEPr] +1 for Web Services::Services_Hatena | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41717@lists.php.net to get a copy of this message | ||
Justin Patrin (http://pear.php.net/user/justinpatrin) has voted +1 on the proposal for Web
Services::Services_Hatena.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=362
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=362&handle=justinpatrin
This vote is conditional. The condition is:
Use single qoutes for your strings (be consistent!).
Use html_entitiy_decode() instead of strtr in _Autolink.
If this package will stay as PHP5 only, all errors should throw a PEAR_Exception (Actually it should
use an exception class extended from it for your package). See the PEAR_Exception class, RFC, and
wiki page which discuss it.
If you decide to make this package PHP4 compatible, methods where an error could happen should
return the PEAR_Error, not just set it internally.
Additionally, $this->result should likely be removed entirely. You're using it as a place to
store the return value of functions instead of returning it. Please change your functions to return
their results instead of setting an internal variable. (Indeed, some of your docblocks list a
@return when you don't actually return...)
All sub-blocks of code (such as inside conditionals and loops) must have { } around them. No:
if ($var == 'val')
return 'hi';
use
if ($var == 'val') {
return 'hi';
}
In Search::getNextPage can $c be 0? If so, make sure that you check it before dividing to avoid
divide by zero errors.
Remove the empty else blocks in Search.
--
Sent by PEPr, the automatic proposal system at http://pear.php.net