src/Carbon/CarbonPeriod.php
public function setOptions($options)
    {
        if (!is_int($options) && !is_null($options)) {
            throw new InvalidArgumentException('Invalid options.');
        }

        $this->options = $options ?: 0;

        $this->handleChangedParameters();

        return $this;
    }
public function setOptions($options)
    {
        if (!is_int($options) && !is_null($options)) {
            throw new InvalidArgumentException('Invalid options.');
        }

        $this->options = $options ?: 0;

        $this->handleChangedParameters();

        return $this;
    }
public function setOptions ( $ options ) { if ( ! is_int ( $ options ) && ! is_null ( $ options ) ) { throw new InvalidArgumentException ( 'Invalid options.' ) ; } $ this -> options = $ options ? : 0 ; $ this -> handleChangedParameters ( ) ; return $ this ; }
Change the period options.

@param int|null $options

@throws \InvalidArgumentException

@return $this
Change the period options .