src/RulesCollection.php
public function withRule(Rule $rule): RulesCollection
    {
        $rules = array_merge($this->rules, [$rule]);

        return new RulesCollection($rules);
    }
public function withRule(Rule $rule): RulesCollection
    {
        $rules = array_merge($this->rules, [$rule]);

        return new RulesCollection($rules);
    }
public function withRule ( Rule $ rule ) : RulesCollection { $ rules = array_merge ( $ this -> rules , [ $ rule ] ) ; return new RulesCollection ( $ rules ) ; }
Return a new rules collection with an aditional rule.

@param \Ellipse\Validation\Rule $rule
@return \Ellipse\Validation\RulesCollection
Return a new rules collection with an aditional rule .