Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / php / services19.php
index 985f0a96283d5d3f56af163ca2223b0d9bdd20ff..da8135e32b6e88cd999821a5617597bbf6b062ff 100644 (file)
@@ -2,7 +2,6 @@
 
 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;
@@ -32,25 +31,19 @@ class ProjectServiceContainer extends Container
     }
 
     /**
-     * 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()
     {