src/Behat/Behat/HelperContainer/Argument/ServicesResolverFactory.php
private function createResolvers($container, $autowire)
    {
        if (!$container instanceof ContainerInterface) {
            throw new WrongContainerClassException(
                sprintf(
                    'Service container is expected to implement `Psr\Container\ContainerInterface`, but `%s` does not.',
                    get_class($container)
                ),
                get_class($container)
            );
        }

        if ($autowire) {
            return array(new ServicesResolver($container), new AutowiringResolver($container));
        }

        return array(new ServicesResolver($container));
    }
private function createResolvers($container, $autowire)
    {
        if (!$container instanceof ContainerInterface) {
            throw new WrongContainerClassException(
                sprintf(
                    'Service container is expected to implement `Psr\Container\ContainerInterface`, but `%s` does not.',
                    get_class($container)
                ),
                get_class($container)
            );
        }

        if ($autowire) {
            return array(new ServicesResolver($container), new AutowiringResolver($container));
        }

        return array(new ServicesResolver($container));
    }
private function createResolvers ( $ container , $ autowire ) { if ( ! $ container instanceof ContainerInterface ) { throw new WrongContainerClassException ( sprintf ( 'Service container is expected to implement `Psr\Container\ContainerInterface`, but `%s` does not.' , get_class ( $ container ) ) , get_class ( $ container ) ) ; } if ( $ autowire ) { return array ( new ServicesResolver ( $ container ) , new AutowiringResolver ( $ container ) ) ; } return array ( new ServicesResolver ( $ container ) ) ; }
Checks if container implements the correct interface and creates resolver using it.

@param mixed $container
@param bool  $autowire

@return ArgumentResolver[]

@throws WrongContainerClassException
Checks if container implements the correct interface and creates resolver using it .