src/Behat/Behat/HelperContainer/ServiceContainer/HelperContainerExtension.php
private function isDefinitionShared(Definition $definition)
    {
        if (method_exists($definition, 'isShared')) {
            return $definition->isShared();
        } else if (method_exists($definition, 'getScope')) {
            return $definition->getScope() !== ContainerBuilder::SCOPE_PROTOTYPE;
        }

        return false;
    }
private function isDefinitionShared(Definition $definition)
    {
        if (method_exists($definition, 'isShared')) {
            return $definition->isShared();
        } else if (method_exists($definition, 'getScope')) {
            return $definition->getScope() !== ContainerBuilder::SCOPE_PROTOTYPE;
        }

        return false;
    }
private function isDefinitionShared ( Definition $ definition ) { if ( method_exists ( $ definition , 'isShared' ) ) { return $ definition -> isShared ( ) ; } else if ( method_exists ( $ definition , 'getScope' ) ) { return $ definition -> getScope ( ) !== ContainerBuilder :: SCOPE_PROTOTYPE ; } return false ; }
Checks if provided definition is shared.

@param Definition $definition

@return bool

@todo Remove after upgrading to Symfony 2.8+
Checks if provided definition is shared .