use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\DependencyInjection\Exception\InactiveScopeException;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
}
/**
- * Gets the 'service_from_anonymous_factory' service.
+ * Gets the public 'service_from_anonymous_factory' shared service.
*
- * This service is shared.
- * This method always returns the same instance of the service.
- *
- * @return \Bar\FooClass A Bar\FooClass instance
+ * @return \Bar\FooClass
*/
protected function getServiceFromAnonymousFactoryService()
{
- return $this->services['service_from_anonymous_factory'] = call_user_func(array(new \Bar\FooClass(), 'getInstance'));
+ return $this->services['service_from_anonymous_factory'] = (new \Bar\FooClass())->getInstance();
}
/**
- * Gets the 'service_with_method_call_and_factory' service.
- *
- * This service is shared.
- * This method always returns the same instance of the service.
+ * Gets the public 'service_with_method_call_and_factory' shared service.
*
- * @return \Bar\FooClass A Bar\FooClass instance
+ * @return \Bar\FooClass
*/
protected function getServiceWithMethodCallAndFactoryService()
{