[PEPr] +1 for Web Services::Services_Libravatar
| From: | Till Klampaeckel | Date: | Tue, 21 Jun 2011 13:58:21 +0000 |
| Subject: | [PEPr] +1 for Web Services::Services_Libravatar | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54331@lists.php.net to get a copy of this message | ||
Till Klampaeckel (http://pear.php.net/user/till) has voted +1 on the proposal for Web
Services::Services_Libravatar.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=658
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=658&handle=till
Comment:
I second Markus' suggestions. Overall, nice code.
Here are my additions why my vote is conditional:
1) Your methods in their current form are way to long. I think you can
break them up into multiple methods, and also refactor your if/else
structures to exit early.
2) I'd also rename url() to getUrl() (no params), and I'd use a
__construct($identifier, array $options = null) to initialize the class.
3) For the sake of re-using this object, each option provided to the
constructur should have a set-method associated. Maybe setOptions() and
setIdentifier()?
4) srvGet() - or rather getSrvRecord() - should utilize Net_DNS2.
5) I'd really, really like to see a couple unit tests. Let us know if we
can help you.