Use null coalescing operator wherever possible
authorMatthias Schmidt <gravatronics@live.com>
Fri, 30 Apr 2021 06:00:22 +0000 (08:00 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 30 Apr 2021 06:00:29 +0000 (08:00 +0200)
wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php

index 79ed95dcfe1fa0e730cf841bdb723b90ac2c70af..39277584bc710392e0fedf7e5918262beb1431dd 100644 (file)
@@ -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;
     }
 
     /**