Re: Mail_Mbox

From: Date: Sat, 28 Dec 2002 04:14:37 +0000
Subject: Re: Mail_Mbox
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11863@lists.php.net to get a copy of this message
On Fri, Dec 27, 2002 at 06:49:15PM -0300, Roberto Bert wrote: > I fixed it: > http://opensource.under.com.br/Mail_Mbox/Mail_Mbox-0.1.1.tgz I still see a number of stylistic problems: 1. The comment spacing is inconsistent, e.g.: * @param int $resourceId Mbox resouce id created by open * @param int $message The number of Message * @return string Return the message else pear error class 2. Don't attempt to line up long assignment statements such as: $bytesStart = $this->_resources[$resourceId]["messages"][$message][0]; $bytesEnd = $this->_resources[$resourceId]["messages"][$message][1]; 3. Attempt to wrap as much code to 80 columns as possible. Going beyond 80 characters for a line of code is acceptable in most cases, but comments should always break by the 80 column mark. 4. Use XHTML-compliant tags. For example, <br /> should be used instead of <br>. printf("%08d=%08d<br>",$bytesStart,$bytesEnd); 5. Please add a space after each comma. The previous example demonstrates a case where spaces should be added. 6. I generally prefer the method name "remove" to the name "delete" because "delete" is the name of an existing function and may become a reserved keyword in the future. 7. If you're going to use @access tags, please provide them for all of the methods. 8. Please review your grammar and spelling in the comments. I understand English may not be your native language, but misspellings such as "lenght" should definitely be fixed. Overall, the code looks good. I hope you don't get too bad an impression from my comments. I just want to see the resulting code be as good as possible. -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

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