diff options
author | wn_ <[email protected]> | 2022-08-12 18:21:38 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2022-08-12 18:21:38 +0000 |
commit | c301053965004f43408545f4b80cf444ce6a9587 (patch) | |
tree | 8a7ea219a065bceee9924553d4003806d0f5c1fd /classes/rpc.php | |
parent | 3487c922b3f34449fecdddebe1fd2ee3b8c42e65 (diff) |
Use the null coalescing assignment operator in various places.
Diffstat (limited to 'classes/rpc.php')
-rwxr-xr-x | classes/rpc.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/classes/rpc.php b/classes/rpc.php index bb14225be..ef2cdfc49 100755 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -753,12 +753,11 @@ class RPC extends Handler_Protected { function hotkeyHelp(): void { $info = self::get_hotkeys_info(); $imap = self::get_hotkeys_map(); - $omap = array(); + $omap = []; foreach ($imap[1] as $sequence => $action) { - if (!isset($omap[$action])) $omap[$action] = array(); - - array_push($omap[$action], $sequence); + $omap[$action] ??= []; + $omap[$action][] = $sequence; } ?> |