Re: Mail/mime.php changes

From: Date: Sun, 16 Sep 2001 17:29:04 +0000
Subject: Re: Mail/mime.php changes
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1948@lists.php.net to get a copy of this message
On Sun, Sep 16, 2001 at 05:11:51PM +0100, Richard Heyes wrote: > The changes I've made are available here: > > http://www.heyes-computing.net/pear.mime/ > > The diff is 20k hence me putting it on the web. It looks pretty good at a glance. I'd appreciate it if you could separate the stylistic changes into their own commit, however (like the prefixing of "private" variables with an underscore). Lines like this: > $this->_parts[] = array( 'body' => $filedata, ... don't get the extra space after the opening array paren. Function declarations, like this: > function Mail_mime ($crlf = "\r\n") ... don't get the extra space between the function name and the first paren. > if (!isset($this->_txtbody)) > $this->_txtbody = 'No text version was supplied'; > Please wrap single statements like this in braces. You might want to change that !isset() test to an empty() test, too. > '--'.$orig_boundary . MAIL_MIME_CRLF . > 'Content-Type: multipart/alternative;' . MAIL_MIME_CRLF . chr(9) . > 'boundary="'.$sec_boundary.'"'.MAIL_MIME_CRLF . MAIL_MIME_CRLF . Please be consistent with adding spaces around the dot operator. There should be one space before it and one space after it. > for ($i=0; $i<count($this->_html_images); $i++) { Please pad these operators with spaces, too. Also, the majority of the PEAR code uses 'true' and 'false' (lowercase). I'm not sure if we should make that a style standard, but it might be good to keep that consistent. There's no functional difference, of course. Aside from my style comments, the code looks very good (although I haven't actually tested it). Thanks for doing this work. -- Jon Parise (jon@csh.rit.edu) . Information Technology (B.S.) http://www.csh.rit.edu/~jon/ : Computer Science House Member

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