private function changeReference(Reference $reference, $serviceId)
    {
        if (method_exists($reference, 'isStrict')) {
            // Stay compatible with Symfony 2
            return new Reference($serviceId, $reference->getInvalidBehavior(), $reference->isStrict(false));
        }

        return new Reference($serviceId, $reference->getInvalidBehavior());
    }
private function changeReference(Reference $reference, $serviceId)
    {
        if (method_exists($reference, 'isStrict')) {
            // Stay compatible with Symfony 2
            return new Reference($serviceId, $reference->getInvalidBehavior(), $reference->isStrict(false));
        }

        return new Reference($serviceId, $reference->getInvalidBehavior());
    }
private function changeReference ( Reference $ reference , $ serviceId ) { if ( method_exists ( $ reference , 'isStrict' ) ) { // Stay compatible with Symfony 2 return new Reference ( $ serviceId , $ reference -> getInvalidBehavior ( ) , $ reference -> isStrict ( false ) ) ; } return new Reference ( $ serviceId , $ reference -> getInvalidBehavior ( ) ) ; }
Creates a copy of a reference and alters the service ID.

@param Reference $reference
@param string    $serviceId

@return Reference
Creates a copy of a reference and alters the service ID .