From 340cc12e209890790033cdc77f390fda6a2996ec Mon Sep 17 00:00:00 2001 From: Nathanael Esayeas Date: Tue, 4 Oct 2022 09:45:04 -0500 Subject: [PATCH] Update Container.php Signed-off-by: Nathanael Esayeas --- src/Container.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Container.php b/src/Container.php index 0ccb208..bdb77a2 100644 --- a/src/Container.php +++ b/src/Container.php @@ -256,7 +256,11 @@ public function extend(string $class, callable $extension): void $factories = $this->services[self::FACTORIES]; $extensions = $this->services[self::EXTENSIONS]; - if (! array_key_exists($class, $extensions) && ! array_key_exists($class, $factories) && ! class_exists($class)) { + if ( + ! array_key_exists($class, $extensions) + && ! array_key_exists($class, $factories) + && ! class_exists($class) + ) { throw new ServiceNotFoundException($class); }