protected function modifyBitmaskValue($flags, $toggle, $flagName)
    {
        $bit = $this->getBitForAttribute($flagName);

        if ($toggle) {
            $flags->add($bit);
        } else {
            $flags->remove($bit);
        }
    }