[PEPr] Comment on Text::Text_CAPTCHA_Driver_Numeral

From: Date: Mon, 16 Oct 2006 19:29:38 +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-44570@lists.php.net to get a copy of this message
Graham Christensen (http://pear.php.net/user/itrebal) has commented on the proposal for Text::Text_CAPTCHA_Driver_Numeral. Comment: [snip] private function doSubstract() { /** * Check if firstNumber is smaller than secondNumber */ if ($this->firstNumber < $this->secondNumber) { $this->setFirstNumber(); $this->generateOperation(); } $answer = $this->firstNumber - $this->secondNumber; $this->setAnswer($answer); } I would suggest instead of continuing on with the function, as the rest of the code is not required, return'ing or using an if/else statement. Reducing the overhead of useless code being run. 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 (#44570) next »