From 6722dee1d657008fe2e41d1058eb91ee24d5c8e2 Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 11 Mar 2022 22:58:58 +0100 Subject: [PATCH] fix attempt Signed-off-by: szaimen --- php/src/ContainerDefinitionFetcher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 60e92305..6658d7d1 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -27,7 +27,7 @@ class ContainerDefinitionFetcher $this->container = $container; } - public function GetContainerById(string $id): ?Container + public function GetContainerById(string $id): Container { $containers = $this->FetchDefinition(); @@ -37,7 +37,7 @@ class ContainerDefinitionFetcher } } - return null; + throw new \Exception("The provided id " . $id . " was not found in the container definition."); } /**