Refactored EntityFlagType.php and fixed some docbock issues.