joomla/joomla-cms — pull request #4164 by nonumber (2014-08-23 16:01:35+00:00)
Title: Code cleanup: installer/installer

Cleans up useless uses of ```else``` and unnecessary indentation due to 'reverse-logic' in ```if```s.

For instance, instead of wrapping stuff in multiple 'positive' ```if``` checks, simply do 'negative' ```if```checks and return early.
This means you don't need to nest if statements.

The same can be done with for/foreach loops, but then do ```continue``` in 'negative' ```if``` checks.

Also removed ```else``` statements if the previous ```if```` block ends with a return, like:
```
if($something)
{
doStuff();;

return $this;
}
else
{
doOtherStuff();

return $that;
}```
Can be replaced with:
```
if($something)
{
doStuff();;

return $this;
}

doOtherStuff();

return $that;
```