On 15.12.2009, at 21:03, Tom Boutell wrote:

> But I much prefer your refactoring. Yes, it is a little more verbose,
> but it is infinitely less likely to lead to confusion and bugs down
> the road. It's worth it.
> 
> On Tue, Dec 15, 2009 at 2:40 PM, Davide Borsatto <[email protected]> wrote:
>> With "assignment in condition" you mean something like
>> 
>> if ($results = $this->getResults())
>> {
>>  // ...
>> }
>> 
>> ?
>> 
>> If so, then I think it's not about coding standards. Those standards
>> define the way you indent code, where you put brackets and stuff like
>> this.
>> By the way the refactored code above would be look like this:
>> 
>> $results = $this->getResults();
>> if ($results)
>> {
>>  // ...
>> }


its kinda of tricky to discuss coding styles because 99% is taste and not facts.

imho it would make sense to adopt imho defacto standard Horde aka PEAR aka ZF 
(there few collisions between PEAR and ZF, I prefer PEAR in those cases, but ZF 
is more detailed in many OO aspects) for Symfony2.
and yes i think its wise to leave assignments out of conditions.

regards,
Lukas Kahwe Smith
[email protected]



--

You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en.


Reply via email to