From 1d2ddd926644436db02080b395af1720558b6484 Mon Sep 17 00:00:00 2001 From: Andrei Pisarevskii Date: Sat, 2 Dec 2023 00:57:25 +0300 Subject: [PATCH] Improved performance by over 5% for resolving not set services. --- src/Container.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Container.php b/src/Container.php index d9ade4f..872ff2f 100644 --- a/src/Container.php +++ b/src/Container.php @@ -149,11 +149,6 @@ protected function resolve_object( string $service ): object { $constructor_args = []; foreach ( $params as $param ) { if ( $param_class = $param->getClass() ) { - if ( $this->has( $param_class->getName() ) ) { - $constructor_args[] = $this->get( $param_class->getName() ); - continue; - } - $constructor_args[] = $this->get( $param_class->getName() ); continue; }