Re: CS discussion
| From: | Martin Jansen | Date: | Tue, 15 Jul 2003 18:42:35 +0000 |
| Subject: | Re: CS discussion | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-58@lists.php.net to get a copy of this message | ||
On Tue Jul 15, 2003 at 01:4538PM +0200, Lukas Smith wrote:
> <?php
> if ((condition1)
> || (condition2)
> ) {
> action1;
> } elseif ((condition3)
> && (condition4)
> ) {
> action2;
> } else {
> defaultaction;
> }
> ?>
Generally this looks nice for me, but I'm wondering if we really need to
regulate this in the Coding Standards?
> 2) method naming
> here are a few suggestions:
>
> factory() (instead of connect() or create())
I guess you are *only* talking about situations, where connect() or
create() implement the factory pattern, right?
> singleton() (instead of getInstanceOf())
> connect() (instead of open())
> disconnect() (instead of close() or quite())
When working with files, (dis)connect() can be somewhat misleading, don't you
think?
--
- Martin Martin Jansen
http://martinjansen.com/