From 4eef458d29feceea0a6814f7ad641939b022171b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 2 Nov 2021 16:03:43 +0000 Subject: [PATCH] Config: throw AssumptionFailedError if config type is invalid or DETECT during save() this should never happen ... it was already checked in load() --- src/utils/Config.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/Config.php b/src/utils/Config.php index 696269a1b..f65f77190 100644 --- a/src/utils/Config.php +++ b/src/utils/Config.php @@ -205,8 +205,6 @@ class Config{ /** * Flushes the config to disk in the appropriate format. - * - * @throws \InvalidStateException if config type is not valid */ public function save() : void{ $content = null; @@ -227,7 +225,7 @@ class Config{ $content = self::writeList(array_keys($this->config)); break; default: - throw new \InvalidStateException("Config type is unknown, has not been set or not detected"); + throw new AssumptionFailedError("Config type is unknown, has not been set or not detected"); } file_put_contents($this->file, $content);