Re: Re: cvs: php4 /pear DB.php /pear/DB common.phpmysql.php
| From: | Chuck Hagenbuch | Date: | Mon, 04 Dec 2000 18:51:07 +0000 |
| Subject: | Re: Re: cvs: php4 /pear DB.php /pear/DB common.phpmysql.php | ||
| References: | 1 2 3 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-499@lists.php.net to get a copy of this message | ||
Quoting Sebastian Bergmann <sb@sebastian-bergmann.de>:
> Agreed, but are you really telling me that
[snip]
> is more readable as
[snip]
No - I didn't say anything either way. I was merely trying to point out that
making large conversions like this could either be "making a standard on the
ground" - ie, trying to push a certain standard by default - or just wasted
work, if we decide on a different standard. And while I'm on it, I'm personally
very much for seperating whitespace and functional commits - large commits like
that one, where there are sections of 20+ lines in a row instead of alternating
+/- lines, are hell to find meaningful changes in.
Anyway, my preference (following the Horde standards that Jon provided a link
to) would be:
function connect(&$dsn, $persistent = false)
{
if (is_array($dsn)) {
$dsninfo = &$dsn;
} else {
$dsninfo = DB::parseDSN($dsn);
}
if (!$dsninfo || !$dsninfo['phptype']) {
return $this->raiseError();
}
}
My general philosophy is to avoid gratuitous whitespace - such as $i[ $j ] -
which only breaks lines into more visual chunks than you really need.
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"If you can't stand the heat, get out of the chicken!" - Baby Blues