This if/else structure is not the flavor used as laid out in https://drupal.org/coding-standards.