[RCD] Codebase cleanup, PSR-1/2 compliance - and before you say no, I'm offering to do the work

Sandor Takacs taki at alkoholista.hu
Thu Sep 5 11:55:17 CEST 2013

2013-09-05 11:09 időpontban David Deutsch ezt írta:

> Not sure about that. In some cases I have seen so far, there were quite 
> a number of elseifs. My goal was to get out of the function as soon as 
> possible - continuing to iterate through all the cases you already know 
> won't apply doesn't seem like a good use of resources to me.

In my example if the first expression returns with false no other 
iteration made just return with the predefinied null variable.

> I also don't think that part of it was controversial - it was more 
> about that up until now, returns were in general either at the start or 
> end of a function and what I introduced used some more in the middle of 
> a function. So in your example, you would still kinda-sorta hunt for 
> where the $return is set in the first place.

I really hate negated expressions and mid-block returns but this is not 
my code I just wrote some plugins to fit RC in my environment.


More information about the dev mailing list