Skip to content

Commit

Permalink
Formatting and types hint
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Jan 20, 2025
1 parent c5d5bb8 commit cbe0d18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1057,14 +1057,14 @@ function get_browser_real_ip() {

return '0';
}
function setSession($key, $data) {
function setSession($key, $data): void {
$_SESSION[setting('core.session_prefix') . $key] = $data;
}
function getSession($key) {
$key = setting('core.session_prefix') . $key;
return isset($_SESSION[$key]) ? $_SESSION[$key] : false;
return $_SESSION[$key] ?? false;
}
function unsetSession($key) {
function unsetSession($key): void {
unset($_SESSION[setting('core.session_prefix') . $key]);
}

Expand Down

0 comments on commit cbe0d18

Please sign in to comment.