From 0f7c7cebeb689e9a16d2590eb3c0a715fda45e2b Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 18 Jul 2018 02:32:35 -0400 Subject: [PATCH] Change (P)Config::set return value to bool --- src/Core/Config.php | 2 +- src/Core/Config/IConfigAdapter.php | 2 +- src/Core/Config/IPConfigAdapter.php | 2 +- src/Core/Config/JITConfigAdapter.php | 1 - src/Core/Config/JITPConfigAdapter.php | 1 - src/Core/PConfig.php | 2 +- 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Core/Config.php b/src/Core/Config.php index 3c1d3245fd..1e7fb9202b 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -95,7 +95,7 @@ class Config extends BaseObject * @param string $key The configuration key to set * @param mixed $value The value to store * - * @return mixed Stored $value or false if the database update failed + * @return bool Operation success */ public static function set($family, $key, $value) { diff --git a/src/Core/Config/IConfigAdapter.php b/src/Core/Config/IConfigAdapter.php index d1bb600331..4bd8eac264 100644 --- a/src/Core/Config/IConfigAdapter.php +++ b/src/Core/Config/IConfigAdapter.php @@ -53,7 +53,7 @@ interface IConfigAdapter * @param string $key The configuration key to set * @param mixed $value The value to store * - * @return mixed Stored $value or false if the database update failed + * @return bool Operation success */ public function set($cat, $k, $value); diff --git a/src/Core/Config/IPConfigAdapter.php b/src/Core/Config/IPConfigAdapter.php index a0f0c9a94c..b912418432 100644 --- a/src/Core/Config/IPConfigAdapter.php +++ b/src/Core/Config/IPConfigAdapter.php @@ -57,7 +57,7 @@ interface IPConfigAdapter * @param string $k The configuration key to set * @param string $value The value to store * - * @return mixed Stored $value or false + * @return bool Operation success */ public function set($uid, $cat, $k, $value); diff --git a/src/Core/Config/JITConfigAdapter.php b/src/Core/Config/JITConfigAdapter.php index 0e7731690b..81a0c9890d 100644 --- a/src/Core/Config/JITConfigAdapter.php +++ b/src/Core/Config/JITConfigAdapter.php @@ -106,7 +106,6 @@ class JITConfigAdapter extends BaseObject implements IConfigAdapter if ($result) { $this->in_db[$cat][$k] = true; - return $value; } return $result; diff --git a/src/Core/Config/JITPConfigAdapter.php b/src/Core/Config/JITPConfigAdapter.php index ce9c5b6462..ffd807a362 100644 --- a/src/Core/Config/JITPConfigAdapter.php +++ b/src/Core/Config/JITPConfigAdapter.php @@ -98,7 +98,6 @@ class JITPConfigAdapter extends BaseObject implements IPConfigAdapter if ($result) { $this->in_db[$uid][$cat][$k] = true; - return $value; } return $result; diff --git a/src/Core/PConfig.php b/src/Core/PConfig.php index 274122deda..2f7bd926f4 100644 --- a/src/Core/PConfig.php +++ b/src/Core/PConfig.php @@ -93,7 +93,7 @@ class PConfig extends BaseObject * @param string $key The configuration key to set * @param string $value The value to store * - * @return mixed Stored $value or false + * @return bool Operation success */ public static function set($uid, $family, $key, $value) { -- 2.39.5