From 85a6be1d7d0a325d8e268941702bc962184df8a1 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sat, 23 Oct 2021 13:06:41 +0200 Subject: [PATCH] Changed the exception instance to InvalidArgument exception. --- application/helpers/config_helper.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/helpers/config_helper.php b/application/helpers/config_helper.php index 270904fb..7b262c62 100644 --- a/application/helpers/config_helper.php +++ b/application/helpers/config_helper.php @@ -20,12 +20,14 @@ * * Example "Set": * - * config([ 'version' => '1.0.0' ]); + * config(['version' => '1.0.0']); * * @param array|string $key Configuration key. * @param mixed $default Default value in case the requested config has no value. * * @return mixed|NULL Returns the configuration value or NULL if setting the configuration key. + * + * @throws InvalidArgumentException */ function config($key, $default = NULL) { @@ -34,7 +36,7 @@ function config($key, $default = NULL) if (is_null($key)) { - throw new Exception('The key argument cannot be empty.'); + throw new InvalidArgumentException('The key argument cannot be empty.'); } if (is_array($key))