code refactoring for EntityRulesAbstract
Code Quality badge added