Provider/EntityProvider.php
protected function getEntity(Rule $rule)
    {
        if ($rule instanceof RuleSet) {
            foreach ($rule->getChildren() as $child) {
                return $child->getEntity();
            }

            throw new \Exception(sprintf('The rule %s and non of its children have an entity', get_class($rule)));
        }

        return $rule->getEntity();
    }
protected function getEntity(Rule $rule)
    {
        if ($rule instanceof RuleSet) {
            foreach ($rule->getChildren() as $child) {
                return $child->getEntity();
            }

            throw new \Exception(sprintf('The rule %s and non of its children have an entity', get_class($rule)));
        }

        return $rule->getEntity();
    }
protected function getEntity ( Rule $ rule ) { if ( $ rule instanceof RuleSet ) { foreach ( $ rule -> getChildren ( ) as $ child ) { return $ child -> getEntity ( ) ; } throw new \ Exception ( sprintf ( 'The rule %s and non of its children have an entity' , get_class ( $ rule ) ) ) ; } return $ rule -> getEntity ( ) ; }
Get the entity from the passed rule

@param Rule $rule
Get the entity from the passed rule