I'll merge it anyway and I'm just being picky, but the elseif belongs on the same line as the previous closing curly brace in PSR standards.