src/Connection/Factory.php
protected function checkInitializer($initializer)
    {
        if (is_callable($initializer)) {
            return $initializer;
        }

        $class = new \ReflectionClass($initializer);

        if (!$class->isSubclassOf('Predis\Connection\NodeConnectionInterface')) {
            throw new \InvalidArgumentException(
                'A connection initializer must be a valid connection class or a callable object.'
            );
        }

        return $initializer;
    }
protected function checkInitializer($initializer)
    {
        if (is_callable($initializer)) {
            return $initializer;
        }

        $class = new \ReflectionClass($initializer);

        if (!$class->isSubclassOf('Predis\Connection\NodeConnectionInterface')) {
            throw new \InvalidArgumentException(
                'A connection initializer must be a valid connection class or a callable object.'
            );
        }

        return $initializer;
    }
protected function checkInitializer ( $ initializer ) { if ( is_callable ( $ initializer ) ) { return $ initializer ; } $ class = new \ ReflectionClass ( $ initializer ) ; if ( ! $ class -> isSubclassOf ( 'Predis\Connection\NodeConnectionInterface' ) ) { throw new \ InvalidArgumentException ( 'A connection initializer must be a valid connection class or a callable object.' ) ; } return $ initializer ; }
Checks if the provided argument represents a valid connection class
implementing Predis\Connection\NodeConnectionInterface. Optionally,
callable objects are used for lazy initialization of connection objects.

@param mixed $initializer FQN of a connection class or a callable for lazy initialization.

@throws \InvalidArgumentException

@return mixed
Checks if the provided argument represents a valid connection class implementing Predis \ Connection \ NodeConnectionInterface . Optionally callable objects are used for lazy initialization of connection objects .