protected function onHandler(int $day, bool $set = null)
    {
        $frequency = $this->getFrequency();
        if ($set === null) {
            return (bool) ($frequency & $day);
        }
        if ($set && $frequency ^ $day) {
            return $this->setFrequency($frequency | $day);
        }
        if (!$set && $frequency & $day) {
            return $this->setFrequency($frequency ^ $day);
        }

        return $this;
    }