User tests: Successful: Unsuccessful:
This series of Pull Requests improve some basic code styles.
Mostly if/else syntax improvements, focussing on removing else statements which follow returns (or continues in loops).
Also de-nesting of if structures by adding early returns/elses.
Example:
function foobar($foo, $bar)
{
if($foo > $bar)
{
return $foo;
} else {
return $bar;
}
}
Can be changed to:
function foobar($foo, $bar)
{
if($foo > $bar)
{
return $foo;
}
return $bar;
}
PS: This only illustrates the 'issue' with the useless else statements.
Current PRs in this series:
Labels |
Added:
?
|
Category | ⇒ | Code style |
Title |
|
Tested and works fine
All synced up.
One more test...
Status | Pending | ⇒ | Ready to Commit |
RTC Thanks
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-04-28 20:08:23 |
Closed_By | ⇒ | roland-d | |
Labels |
Removed:
?
?
|
Labels |
Removed:
?
|
At a quick overview only a couple of places I feel what you're changing is not for the better. You obviously need to fix the two errors in travis for code style. But overall (obviously this is going to need 2 thorough in practice tests)