[PEPr] Comment on Authentication::Auth_MicroID

From: Date: Fri, 14 Mar 2008 10:16:45 +0000
Subject: [PEPr] Comment on Authentication::Auth_MicroID
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49424@lists.php.net to get a copy of this message
Ken Guest (http://pear.php.net/user/kguest) has commented on the proposal for Authentication::Auth_MicroID. Comment: Nice work, but I did find some issues: 1// typo alert: I ran the tests and found the second one failed - this is due to a '$microid' variable being used in the MicroID::verify method. This should be $microID. There are a few other places where there is a $microid variable being used. Be consistent and choose one name and use it everywhere! 2// I also found some of the indentation is inconsistent in the verify method. 3/ Unless required for variable expansion, I would use just single quotes. 4// Regarding the exception class; I agree with Michael and for this reason: If you name the exception class to something more specific it'll be possible for people using your module to write cleaner code for handling thrown exceptions based on the class name rather than checking an error code (which you would then have to define, document etc etc). So, picking up on what Philippe suggested, you might have: Auth_MircoID_AlgorithmNotFoundException Auth_MircoID_IdentityUriNotValidException Auth_MircoID_ServiceUriNotValidException I'd suggest using Validate::uri and possibly Validate::email to determine whether the given URIs are valid rather than duplicating code. Well done so far and good luck with the rest of the proposal process! Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=542 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

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