mirror of
https://github.com/friendica/friendica
synced 2025-04-27 19:50:12 +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
|
@ -48,7 +48,7 @@ interface IHandleSessions
|
|||
* Handle the case where session_start() hasn't been called and the super global isn't available.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $defaults
|
||||
* @param mixed $defaults Deprecated, use `Session->get($name) ?? $defaults` instead
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -58,7 +58,7 @@ interface IHandleSessions
|
|||
* Retrieves a value from the provided key if it exists and removes it from session
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $defaults
|
||||
* @param mixed $defaults Deprecated, use `Session->pop($name) ?? $defaults` instead
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue