summaryrefslogtreecommitdiff
path: root/classes/rpc.php
diff options
context:
space:
mode:
authorwn_ <[email protected]>2022-08-12 18:21:38 +0000
committerwn_ <[email protected]>2022-08-12 18:21:38 +0000
commitc301053965004f43408545f4b80cf444ce6a9587 (patch)
tree8a7ea219a065bceee9924553d4003806d0f5c1fd /classes/rpc.php
parent3487c922b3f34449fecdddebe1fd2ee3b8c42e65 (diff)
Use the null coalescing assignment operator in various places.
Diffstat (limited to 'classes/rpc.php')
-rwxr-xr-xclasses/rpc.php7
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;
}
?>