[PEPr] Comment on Text::Text_CAPTCHA_Driver_Numeral

From: Date: Mon, 16 Oct 2006 18:33:01 +0000
Subject: [PEPr] Comment on Text::Text_CAPTCHA_Driver_Numeral
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44565@lists.php.net to get a copy of this message
Justin Patrin (http://pear.php.net/user/justinpatrin) has commented on the proposal for Text::Text_CAPTCHA_Driver_Numeral. Comment: What's the point of the following code in doSubtract? if ($this->firstNumber < $this->secondNumber) { $this->setFirstNumber(); $this->generateOperation(); } This doesn't ensure that firstNumber is less than secondNumber as the newly generated number could be less. If this code is needed you should make that while, not if. I think setFirstNumber, setSecondNumber, setOperator, and setOperation should have their names changed as they are not setters, but generators. generateFirstNumber and so on would be more appropriate I think. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=451 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

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