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;
}