mirror of
https://github.com/friendica/friendica
synced 2025-04-24 18:30:11 +00:00
Deprecate default value parameters in Session and Config interfaces
- It is more efficient to use the null coalescing operator ?? that prevents the computation of the default value if the key has been found
This commit is contained in:
parent
da3041a4d4
commit
23dda5d510
3 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ interface IManageConfigValues
|
|||
*
|
||||
* @param string $cat The category of the configuration value
|
||||
* @param string $key The configuration key to query
|
||||
* @param mixed $default_value optional, The value to return if key is not set (default: null)
|
||||
* @param mixed $default_value Deprecated, use `Config->get($cat, $key, null, $refresh) ?? $default_value` instead
|
||||
* @param boolean $refresh optional, If true the config is loaded from the db and not from the cache (default: false)
|
||||
*
|
||||
* @return mixed Stored value or null if it does not exist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue