Re: cvs: pear /Spreadsheet_Excel_Writer/Writer Format.php
| From: | Justin Patrin | Date: | Fri, 11 Nov 2005 03:57:29 +0000 |
| Subject: | Re: cvs: pear /Spreadsheet_Excel_Writer/Writer Format.php | ||
| References: | 1 2 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-36207@lists.php.net to get a copy of this message | ||
On 11/10/05, Daniel Convissor <danielc@analysisandsolutions.com> wrote:
> Hi Xavier:
>
> On Wed, Nov 09, 2005 at 12:29:37AM -0000, Xavier Noguer Gallego wrote:
> > xnoguer Tue Nov 8 19:29:37 2005 EDT
> >
> > Modified files:
> > /pear/Spreadsheet_Excel_Writer/Writer Format.php
> > Log:
> > adding new methods setVAlign() and setHAlign() (request #2480)
> ...snip...
> > + if ($location == 'left') {
> > + $this->_text_h_align = 1;
> > + }
> > + if ($location == 'centre') {
> > + $this->_text_h_align = 2;
> > + }
> > + if ($location == 'center') {
> ... snip...
>
> In situations like this, a switch statement is far more efficient and
> readable. http://php.net/switch
>
Not to mention that multiple ifs like this without else's is very inefficient.
--
Justin Patrin