Skip to content

Commit

Permalink
Update Container.php
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Oct 4, 2022
1 parent 3acaa85 commit 340cc12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 340cc12

Please sign in to comment.