From a46cd2fb36f57547586d6eda77128d1bdb44cf0b Mon Sep 17 00:00:00 2001
From: Philipp <admin@philipp.info>
Date: Tue, 3 Jan 2023 17:26:48 +0100
Subject: [PATCH] Remove get() from config transaction interface

---
 .../ISetConfigValuesTransactionally.php          | 16 ----------------
 src/Core/Config/Model/ConfigTransaction.php      | 16 ++++++++++++++--
 2 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/src/Core/Config/Capability/ISetConfigValuesTransactionally.php b/src/Core/Config/Capability/ISetConfigValuesTransactionally.php
index ae193f2ce2..501e24f738 100644
--- a/src/Core/Config/Capability/ISetConfigValuesTransactionally.php
+++ b/src/Core/Config/Capability/ISetConfigValuesTransactionally.php
@@ -29,22 +29,6 @@ use Friendica\Core\Config\Exception\ConfigPersistenceException;
  */
 interface ISetConfigValuesTransactionally
 {
-	/**
-	 * Get a particular user's config variable given the category name
-	 * ($cat) and a $key.
-	 *
-	 * Get a particular config value from the given category ($cat)
-	 *
-	 * @param string  $cat        The category of the configuration value
-	 * @param string  $key           The configuration key to query
-	 *
-	 * @return mixed Stored value or null if it does not exist
-	 *
-	 * @throws ConfigPersistenceException In case the persistence layer throws errors
-	 *
-	 */
-	public function get(string $cat, string $key);
-
 	/**
 	 * Sets a configuration value for system config
 	 *
diff --git a/src/Core/Config/Model/ConfigTransaction.php b/src/Core/Config/Model/ConfigTransaction.php
index 7ec5784ad2..d8c7d7d43e 100644
--- a/src/Core/Config/Model/ConfigTransaction.php
+++ b/src/Core/Config/Model/ConfigTransaction.php
@@ -45,8 +45,20 @@ class ConfigTransaction implements ISetConfigValuesTransactionally
 		$this->delCache = new Cache();
 	}
 
-	/** {@inheritDoc} */
-	public function get(string $cat, string $key)
+	/**
+	 * Get a particular user's config variable given the category name
+	 * ($cat) and a $key from the current transaction.
+	 *
+	 * Isn't part of the interface because of it's rare use case
+	 *
+	 * @param string  $cat        The category of the configuration value
+	 * @param string  $key           The configuration key to query
+	 *
+	 * @return mixed Stored value or null if it does not exist
+	 *
+	 * @throws ConfigPersistenceException In case the persistence layer throws errors
+	 *
+	 */	public function get(string $cat, string $key)
 	{
 		return !$this->delCache->get($cat, $key) ?
 			($this->cache->get($cat, $key) ?? $this->config->get($cat, $key)) :