From b7aa517e74c5c47b4a6ecd08af308b611cef96e4 Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 11 Mar 2022 22:57:20 +0100 Subject: [PATCH] fix attempt Signed-off-by: szaimen --- php/src/ContainerDefinitionFetcher.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 60e92305..7ec5a47a 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(); @@ -36,8 +36,7 @@ class ContainerDefinitionFetcher return $container; } } - - return null; + throw new Exception("The provided id " . $id . " was not found in the container definition."); } /**