I just ran into this little beauty.
if ($someCondition || !$someOtherCondition || (MyClass::$publicStaticVar > 1) {
$this->setState('normal');
} else {
if (!$moreConditions && $moreAndMoreConditions || $somethingElse) {
$this->setState('normal');
}
}
I'm trying to debug a really nasty problem in tens of thousands of lines of code written as poorly as this or worse, riddled with duplication, SQL injection vulnerabilities, plain 'ol this-has-never-worked idiocy, and WTFery of all kinds. The perpetrators have been rewarded with leadership roles. Tell me, oh denizens of TDWTF, is there ever any escape from this drudgery? I love writing code, and I invest a lot of study and practice into improving. But I'm starting to get the impression that this makes *me* the fool.