From a6544700611b9d857c0ee41faacea661a095add9 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 14 Jul 2019 22:41:09 +0200 Subject: [PATCH] fix phpdoc --- src/Core/Config/Cache/ConfigCache.php | 2 +- src/Core/Config/JitConfiguration.php | 20 ++++++-------------- src/Core/Config/PreloadConfiguration.php | 8 ++++---- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/Core/Config/Cache/ConfigCache.php b/src/Core/Config/Cache/ConfigCache.php index 3119b5db1..bafb3fc95 100644 --- a/src/Core/Config/Cache/ConfigCache.php +++ b/src/Core/Config/Cache/ConfigCache.php @@ -68,7 +68,7 @@ class ConfigCache * * @return null|mixed Returns the value of the Config entry or null if not set */ - public function get(string $cat, string $key = null) + public function get(string $cat, $key = null) { if (isset($this->config[$cat][$key])) { return $this->config[$cat][$key]; diff --git a/src/Core/Config/JitConfiguration.php b/src/Core/Config/JitConfiguration.php index e5b7b5e47..40aa5d6f6 100644 --- a/src/Core/Config/JitConfiguration.php +++ b/src/Core/Config/JitConfiguration.php @@ -5,10 +5,11 @@ namespace Friendica\Core\Config; use Friendica\Model; /** - * This class is responsible for all system-wide configuration values in Friendica - * There are two types of storage - * - The Config-Files (loaded into the FileCache @see Cache\ConfigCache ) - * - The Config-DB-Table (per Config-DB-model @see Model\Config\Config ) + * This class implements the Just-In-Time configuration, which will cache + * config values in a cache, once they are retrieved. + * + * Default Configuration type. + * Provides the best performance for pages loading few configuration variables. */ class JitConfiguration extends Configuration { @@ -106,16 +107,7 @@ class JitConfiguration extends Configuration } /** - * @brief Deletes the given key from the system configuration. - * - * Removes the configured value from the stored cache in $this->configCache - * (@param string $cat The category of the configuration value - * - * @param string $key The configuration key to delete - * - * @return bool - * @see ConfigCache ) and removes it from the database (@see IConfigAdapter ). - * + * {@inheritDoc} */ public function delete(string $cat, string $key) { diff --git a/src/Core/Config/PreloadConfiguration.php b/src/Core/Config/PreloadConfiguration.php index bf57661a1..b5823c614 100644 --- a/src/Core/Config/PreloadConfiguration.php +++ b/src/Core/Config/PreloadConfiguration.php @@ -5,10 +5,10 @@ namespace Friendica\Core\Config; use Friendica\Model; /** - * This class is responsible for all system-wide configuration values in Friendica - * There are two types of storage - * - The Config-Files (loaded into the FileCache @see Cache\ConfigCache ) - * - The Config-DB-Table (per Config-DB-model @see Model\Config\Config ) + * This class implements the preload Time configuration, which will cache + * all config values per call in a cache. + * + * Minimizes the number of database queries to retrieve configuration values at the cost of memory. */ class PreloadConfiguration extends Configuration {