Respect\Validation\Rules\KeySet::addRule PHP Method

addRule() public method

public addRule ( $rule, $arguments = [] )
    public function addRule($rule, $arguments = [])
    {
        if ($rule instanceof AllOf) {
            $rule = $this->filterAllOf($rule);
        }
        if (!$rule instanceof Key) {
            throw new ComponentException('KeySet rule accepts only Key rules');
        }
        $this->appendRule($rule);
        return $this;
    }