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;
    }
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;
    }
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 ; }
Check or set whether this alarm is active on a particular day.

@param int $day Which day to check/set
@param bool $set Set this alarm to be active or not on the specified day

@return bool|AlarmInterface Returns true/false when checking, or AlarmInterface when setting
Check or set whether this alarm is active on a particular day .