55namespace Codeception \Lib \Connector ;
66
77use InvalidArgumentException ;
8+ use ReflectionClass ;
9+ use ReflectionMethod ;
10+ use ReflectionProperty ;
811use Symfony \Bundle \FrameworkBundle \Test \TestContainer ;
912use Symfony \Component \DependencyInjection \ContainerInterface ;
1013use Symfony \Component \HttpFoundation \Request ;
@@ -28,9 +31,9 @@ class Symfony extends HttpKernelBrowser
2831 /**
2932 * Constructor.
3033 *
31- * @param Kernel $kernel A booted HttpKernel instance
32- * @param array $services An injected services
33- * @param bool $rebootable
34+ * @param Kernel $kernel A booted HttpKernel instance
35+ * @param array $services An injected services
36+ * @param bool $rebootable
3437 */
3538 public function __construct (Kernel $ kernel , array $ services = [], bool $ rebootable = true )
3639 {
@@ -133,17 +136,17 @@ private function persistDoctrineConnections(): void
133136 }
134137
135138 if ($ this ->container instanceof TestContainer) {
136- $ reflectedTestContainer = new \ ReflectionMethod ($ this ->container , 'getPublicContainer ' );
139+ $ reflectedTestContainer = new ReflectionMethod ($ this ->container , 'getPublicContainer ' );
137140 $ reflectedTestContainer ->setAccessible (true );
138141 $ publicContainer = $ reflectedTestContainer ->invoke ($ this ->container );
139142 } else {
140143 $ publicContainer = $ this ->container ;
141144 }
142145
143- $ reflectedContainer = new \ ReflectionClass ($ publicContainer );
146+ $ reflectedContainer = new ReflectionClass ($ publicContainer );
144147 $ reflectionTarget = $ reflectedContainer ->hasProperty ('parameters ' ) ? $ publicContainer : $ publicContainer ->getParameterBag ();
145148
146- $ reflectedParameters = new \ ReflectionProperty ($ reflectionTarget , 'parameters ' );
149+ $ reflectedParameters = new ReflectionProperty ($ reflectionTarget , 'parameters ' );
147150 $ reflectedParameters ->setAccessible (true );
148151 $ parameters = $ reflectedParameters ->getValue ($ reflectionTarget );
149152 unset($ parameters ['doctrine.connections ' ]);
0 commit comments