protected function addRule(IRule $rule)
    {
        if ($this->inCondition) {
            /** @var ConditionalRule $lastRule */
            $lastRule = $this->rules[count($this->rules) - 1];
            $lastRule->addRule($rule);
        } else {
            $this->rules[] = $rule;
        }
    }
protected function addRule(IRule $rule)
    {
        if ($this->inCondition) {
            /** @var ConditionalRule $lastRule */
            $lastRule = $this->rules[count($this->rules) - 1];
            $lastRule->addRule($rule);
        } else {
            $this->rules[] = $rule;
        }
    }
protected function addRule ( IRule $ rule ) { if ( $ this -> inCondition ) { /** @var ConditionalRule $lastRule */ $ lastRule = $ this -> rules [ count ( $ this -> rules ) - 1 ] ; $ lastRule -> addRule ( $ rule ) ; } else { $ this -> rules [ ] = $ rule ; } }
Adds a rule to the list

@param IRule $rule The rule to add
Adds a rule to the list