src/Client.php
protected function createOptions($options)
    {
        if (is_array($options)) {
            return new Options($options);
        }

        if ($options instanceof OptionsInterface) {
            return $options;
        }

        throw new \InvalidArgumentException('Invalid type for client options.');
    }
protected function createOptions($options)
    {
        if (is_array($options)) {
            return new Options($options);
        }

        if ($options instanceof OptionsInterface) {
            return $options;
        }

        throw new \InvalidArgumentException('Invalid type for client options.');
    }
protected function createOptions ( $ options ) { if ( is_array ( $ options ) ) { return new Options ( $ options ) ; } if ( $ options instanceof OptionsInterface ) { return $ options ; } throw new \ InvalidArgumentException ( 'Invalid type for client options.' ) ; }
Creates a new instance of Predis\Configuration\Options from different
types of arguments or simply returns the passed argument if it is an
instance of Predis\Configuration\OptionsInterface.

@param mixed $options Client options.

@throws \InvalidArgumentException

@return OptionsInterface
Creates a new instance of Predis \ Configuration \ Options from different types of arguments or simply returns the passed argument if it is an instance of Predis \ Configuration \ OptionsInterface .