src/Behat/Behat/HelperContainer/Call/Filter/ServicesResolver.php
private function getContainer(Call $call)
    {
        if (!$call instanceof EnvironmentCall) {
            throw new UnsupportedCallException(sprintf(
                'ServicesResolver can not filter `%s` call.',
                get_class($call)
            ), $call);
        }

        $environment = $call->getEnvironment();

        if (!$environment instanceof ServiceContainerEnvironment) {
            throw new UnsupportedCallException(sprintf(
                'ServicesResolver can not filter `%s` call.',
                get_class($call)
            ), $call);
        }

        return $environment->getServiceContainer();
    }
private function getContainer(Call $call)
    {
        if (!$call instanceof EnvironmentCall) {
            throw new UnsupportedCallException(sprintf(
                'ServicesResolver can not filter `%s` call.',
                get_class($call)
            ), $call);
        }

        $environment = $call->getEnvironment();

        if (!$environment instanceof ServiceContainerEnvironment) {
            throw new UnsupportedCallException(sprintf(
                'ServicesResolver can not filter `%s` call.',
                get_class($call)
            ), $call);
        }

        return $environment->getServiceContainer();
    }
private function getContainer ( Call $ call ) { if ( ! $ call instanceof EnvironmentCall ) { throw new UnsupportedCallException ( sprintf ( 'ServicesResolver can not filter `%s` call.' , get_class ( $ call ) ) , $ call ) ; } $ environment = $ call -> getEnvironment ( ) ; if ( ! $ environment instanceof ServiceContainerEnvironment ) { throw new UnsupportedCallException ( sprintf ( 'ServicesResolver can not filter `%s` call.' , get_class ( $ call ) ) , $ call ) ; } return $ environment -> getServiceContainer ( ) ; }
Gets container from the call.

@param Call $call

@return null|ContainerInterface

@throws UnsupportedCallException if given call is not EnvironmentCall or environment is not ServiceContainerEnvironment
Gets container from the call .