From 01d199ff5d69fa1497b40f77db3a53b6f9ce91fa Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 30 Apr 2021 08:00:22 +0200 Subject: [PATCH] Use null coalescing operator wherever possible --- .../lib/system/application/ApplicationHandler.class.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index 79ed95dcfe..39277584bc 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -88,11 +88,8 @@ class ApplicationHandler extends SingletonFactory if ($packageID == 1 && !isset($this->cache['application'][1])) { $this->cache['application'][1] = new Application(1); } - if (isset($this->cache['application'][$packageID])) { - return $this->cache['application'][$packageID]; - } - return null; + return $this->cache['application'][$packageID] ?? null; } /** -- 2.20.1