oevad/Image_Canvas — comment on commit 839ae5886252fe4afee8e3bee51bae2f2596cf07
File: Image/Canvas/SVG.php line 241
By CloCkWeRX:

In a few places, there are nested if statements that all try to add to a result.

It might be clearer in the code to return $result when no more things can be added to it (the above seems to be one)

That also lets you swap the code from being
if () {
if () {
if() {
} else () {
}
}
}

to
if (!condition) {
return $result;
}

if (!condition2) {
return $result;
}
... etc

This tends to be a lot cleaner/more readable.