I think it is not necessary, because $targetTableJoin always filled with both keys if one of `switch` case fired. If no `switch` case fired it is abnormal situation (and, I think, we need to add `default` section with throwing exception). In previous version int this case invalid sql generated.