adding {} to if statement for PSR compliance