src/Carbon/CarbonPeriod.php
public function toggleOptions($options, $state = null)
    {
        if ($state === null) {
            $state = ($this->options & $options) !== $options;
        }

        return $this->setOptions(
            $state ?
            $this->options | $options :
            $this->options & ~$options
        );
    }
public function toggleOptions($options, $state = null)
    {
        if ($state === null) {
            $state = ($this->options & $options) !== $options;
        }

        return $this->setOptions(
            $state ?
            $this->options | $options :
            $this->options & ~$options
        );
    }
public function toggleOptions ( $ options , $ state = null ) { if ( $ state === null ) { $ state = ( $ this -> options & $ options ) !== $ options ; } return $ this -> setOptions ( $ state ? $ this -> options | $ options : $ this -> options & ~ $ options ) ; }
Toggle given options on or off.

@param int       $options
@param bool|null $state

@throws \InvalidArgumentException

@return $this
Toggle given options on or off .