Use null coalescing operator wherever possible
authorMatthias Schmidt <gravatronics@live.com>
Thu, 29 Apr 2021 12:53:40 +0000 (14:53 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 29 Apr 2021 12:57:32 +0000 (14:57 +0200)
These changes were not done manually but by using IDE actions.

35 files changed:
wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php
wcfsetup/install/files/lib/data/bbcode/BBCodeCache.class.php
wcfsetup/install/files/lib/data/label/group/ViewableLabelGroup.class.php
wcfsetup/install/files/lib/data/menu/MenuCache.class.php
wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php
wcfsetup/install/files/lib/data/package/PackageCache.class.php
wcfsetup/install/files/lib/data/page/PageCache.class.php
wcfsetup/install/files/lib/data/reaction/type/ReactionTypeCache.class.php
wcfsetup/install/files/lib/data/smiley/SmileyCache.class.php
wcfsetup/install/files/lib/data/trophy/TrophyCache.class.php
wcfsetup/install/files/lib/data/trophy/category/TrophyCategoryCache.class.php
wcfsetup/install/files/lib/data/user/group/UserGroup.class.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/acl/ACLHandler.class.php
wcfsetup/install/files/lib/system/attachment/AbstractAttachmentObjectType.class.php
wcfsetup/install/files/lib/system/box/BoxHandler.class.php
wcfsetup/install/files/lib/system/captcha/CaptchaHandler.class.php
wcfsetup/install/files/lib/system/category/AbstractCategoryType.class.php
wcfsetup/install/files/lib/system/category/CategoryHandler.class.php
wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php
wcfsetup/install/files/lib/system/comment/CommentHandler.class.php
wcfsetup/install/files/lib/system/label/LabelHandler.class.php
wcfsetup/install/files/lib/system/language/LanguageFactory.class.php
wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php
wcfsetup/install/files/lib/system/package/PackageArchive.class.php
wcfsetup/install/files/lib/system/package/validation/PackageValidationManager.class.php
wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php
wcfsetup/install/files/lib/system/registry/RegistryHandler.class.php
wcfsetup/install/files/lib/system/search/ArticleSearch.class.php
wcfsetup/install/files/lib/system/search/PageSearch.class.php
wcfsetup/install/files/lib/system/search/SearchEngine.class.php
wcfsetup/install/files/lib/system/user/activity/event/UserActivityEventHandler.class.php
wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php
wcfsetup/install/files/lib/system/user/collapsible/content/UserCollapsibleContentHandler.class.php
wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php

index 6339abc9727496ffe90ee1145b386d8d325839ae..70293f0006e782dadd4d24e2b2db216c105bccc6 100644 (file)
@@ -60,11 +60,7 @@ abstract class AbstractAcpForm extends AbstractForm
      */
     public function getI18nValue($fieldName)
     {
-        if (isset($this->i18nValues[$fieldName])) {
-            return $this->i18nValues[$fieldName];
-        }
-
-        return null;
+        return $this->i18nValues[$fieldName] ?? null;
     }
 
     /**
index 8c0912ad844835e2a9b4f6e40c24dd4cd4fc9b6c..d9e6c38c52834a9a3af3434f0602309073697b40 100644 (file)
@@ -56,11 +56,7 @@ class BBCodeCache extends SingletonFactory
      */
     public function getBBCodeByTag($tag)
     {
-        if (isset($this->cachedBBCodes[$tag])) {
-            return $this->cachedBBCodes[$tag];
-        }
-
-        return null;
+        return $this->cachedBBCodes[$tag] ?? null;
     }
 
     /**
index e0119da00d8b79e979b36eb5e77e6b7a650b998e..136796f8f936af1f465c8890cafe3910cce59f0a 100644 (file)
@@ -165,11 +165,7 @@ class ViewableLabelGroup extends DatabaseObjectDecorator implements \Countable,
      */
     public function getLabel($labelID)
     {
-        if (isset($this->labels[$labelID])) {
-            return $this->labels[$labelID];
-        }
-
-        return null;
+        return $this->labels[$labelID] ?? null;
     }
 
     /**
index d462d210174f464d256207709895afef754d8e3c..822ec3d980a90ae7d5517d26b66268c7ec8fd96b 100644 (file)
@@ -44,11 +44,7 @@ class MenuCache extends SingletonFactory
      */
     public function getMenuByID($menuID)
     {
-        if (isset($this->cachedMenus[$menuID])) {
-            return $this->cachedMenus[$menuID];
-        }
-
-        return null;
+        return $this->cachedMenus[$menuID] ?? null;
     }
 
     /**
@@ -59,11 +55,7 @@ class MenuCache extends SingletonFactory
      */
     public function getMenuItemsByMenuID($menuID)
     {
-        if (isset($this->cachedMenuItems[$menuID])) {
-            return $this->cachedMenuItems[$menuID];
-        }
-
-        return null;
+        return $this->cachedMenuItems[$menuID] ?? null;
     }
 
     /**
index 45afbfcf149edafe7723c70bc60a0d57dd4b8cd6..550f009da0261eaec2a522a95eea126fbeb14a0d 100644 (file)
@@ -72,11 +72,7 @@ class ObjectTypeCache extends SingletonFactory
      */
     public function getDefinition($definitionID)
     {
-        if (isset($this->definitions[$definitionID])) {
-            return $this->definitions[$definitionID];
-        }
-
-        return null;
+        return $this->definitions[$definitionID] ?? null;
     }
 
     /**
@@ -88,11 +84,7 @@ class ObjectTypeCache extends SingletonFactory
      */
     public function getDefinitionByName($definitionName)
     {
-        if (isset($this->definitionsByName[$definitionName])) {
-            return $this->definitionsByName[$definitionName];
-        }
-
-        return null;
+        return $this->definitionsByName[$definitionName] ?? null;
     }
 
     /**
@@ -125,11 +117,7 @@ class ObjectTypeCache extends SingletonFactory
      */
     public function getObjectType($objectTypeID)
     {
-        if (isset($this->objectTypes[$objectTypeID])) {
-            return $this->objectTypes[$objectTypeID];
-        }
-
-        return null;
+        return $this->objectTypes[$objectTypeID] ?? null;
     }
 
     /**
index 9532be69d96a181620f31e0ad4e6fd4bb00ee4f8..b2652c877bf722f5a3e8116379fa3c5c3b53b2fb 100644 (file)
@@ -37,11 +37,7 @@ class PackageCache extends SingletonFactory
      */
     public function getPackage($packageID)
     {
-        if (isset($this->packages['packages'][$packageID])) {
-            return $this->packages['packages'][$packageID];
-        }
-
-        return null;
+        return $this->packages['packages'][$packageID] ?? null;
     }
 
     /**
@@ -52,11 +48,7 @@ class PackageCache extends SingletonFactory
      */
     public function getPackageID($package)
     {
-        if (isset($this->packages['packageIDs'][$package])) {
-            return $this->packages['packageIDs'][$package];
-        }
-
-        return null;
+        return $this->packages['packageIDs'][$package] ?? null;
     }
 
     /**
index 74cab579c62485a24cff3a28724ce607727708be..104ddf487a4940415a2345dab0623e0d2cc83d3f 100644 (file)
@@ -49,11 +49,7 @@ class PageCache extends SingletonFactory
      */
     public function getPage($pageID)
     {
-        if (isset($this->cache['pages'][$pageID])) {
-            return $this->cache['pages'][$pageID];
-        }
-
-        return null;
+        return $this->cache['pages'][$pageID] ?? null;
     }
 
     /**
index cd2143e1474f66a8717f56d6fd2688875bab276a..35060ddf067f01b648762b9e991061f5f0039178 100644 (file)
@@ -38,11 +38,7 @@ class ReactionTypeCache extends SingletonFactory
      */
     public function getReactionTypeByID($reactionTypeID)
     {
-        if (isset($this->reactionTypes[$reactionTypeID])) {
-            return $this->reactionTypes[$reactionTypeID];
-        }
-
-        return null;
+        return $this->reactionTypes[$reactionTypeID] ?? null;
     }
 
     /**
index dc7a144c5bfd2b5447ab2eabcf172314ee96d8aa..e8349fc08b5b7c3b27bcedd6950f499d0cf824a4 100644 (file)
@@ -85,11 +85,7 @@ class SmileyCache extends SingletonFactory
      */
     public function getSmileyByCode($code)
     {
-        if (isset($this->cachedSmileyByCode[$code])) {
-            return $this->cachedSmileyByCode[$code];
-        }
-
-        return null;
+        return $this->cachedSmileyByCode[$code] ?? null;
     }
 
     /**
index 3036386ba20c956ad7c24e2c82b9e38d952b296c..cde741f5e8e94a6ebf67dc63b420106da0566bee 100644 (file)
@@ -51,11 +51,7 @@ class TrophyCache extends SingletonFactory
      */
     public function getTrophyByID($trophyID)
     {
-        if (isset($this->trophies[$trophyID])) {
-            return $this->trophies[$trophyID];
-        }
-
-        return null;
+        return $this->trophies[$trophyID] ?? null;
     }
 
     /**
index 087b451309733b7dae3a54ddf816a746c8f0ff7b..222d081b60af97178d5fc99e7d59d1500e00286f 100644 (file)
@@ -55,11 +55,7 @@ class TrophyCategoryCache extends SingletonFactory
      */
     public function getCategoryByID($categoryID)
     {
-        if (isset($this->categories[$categoryID])) {
-            return $this->categories[$categoryID];
-        }
-
-        return null;
+        return $this->categories[$categoryID] ?? null;
     }
 
     /**
index 83a0280fcd6b4a33730ca25e2a0972c2e2ac8bed..a8220855eb36dc1ab6ba21ba60e3b30c506e521a 100644 (file)
@@ -182,11 +182,7 @@ class UserGroup extends DatabaseObject implements ITitledObject
     {
         self::getCache();
 
-        if (isset(self::$cache['groups'][$groupID])) {
-            return self::$cache['groups'][$groupID];
-        }
-
-        return null;
+        return self::$cache['groups'][$groupID] ?? null;
     }
 
     /**
index 653a33fc24ad1f80c840c21aae7e902786654e73..c8bbf4a9c6e8889adaba82e2e6d984af27758818 100644 (file)
@@ -747,11 +747,7 @@ class WCF
      */
     public static function getApplicationObject(Application $application)
     {
-        if (isset(self::$applicationObjects[$application->packageID])) {
-            return self::$applicationObjects[$application->packageID];
-        }
-
-        return null;
+        return self::$applicationObjects[$application->packageID] ?? null;
     }
 
     /**
@@ -955,11 +951,7 @@ class WCF
      */
     final protected static function getCoreObject($className)
     {
-        if (isset(self::$coreObjectCache[$className])) {
-            return self::$coreObjectCache[$className];
-        }
-
-        return null;
+        return self::$coreObjectCache[$className] ?? null;
     }
 
     /**
index 88ba131053132b29292bbad59881de21b2b87846..07b5a4df9f0f07cc04226fe344b65f170357bb94 100644 (file)
@@ -218,11 +218,7 @@ class ACLHandler extends SingletonFactory
      */
     public function getCategory($objectTypeID, $categoryName)
     {
-        if (isset($this->categories[$objectTypeID][$categoryName])) {
-            return $this->categories[$objectTypeID][$categoryName];
-        }
-
-        return null;
+        return $this->categories[$objectTypeID][$categoryName] ?? null;
     }
 
     /**
index dc60d79afeb92d21c74b93f9861deec525163ed1..3b359f93e838ce9fc9adef1470932548a3662f36 100644 (file)
@@ -59,11 +59,7 @@ abstract class AbstractAttachmentObjectType implements IAttachmentObjectType
      */
     public function getObject($objectID)
     {
-        if (isset($this->cachedObjects[$objectID])) {
-            return $this->cachedObjects[$objectID];
-        }
-
-        return null;
+        return $this->cachedObjects[$objectID] ?? null;
     }
 
     /**
index feb742c27e3514a81dbcb57663b27a00f63cd130..410b71deb516c2248ac5138dfbf9c551158d0063 100644 (file)
@@ -117,11 +117,7 @@ class BoxHandler extends SingletonFactory
      */
     public function getBox($boxID)
     {
-        if (isset($this->boxes[$boxID])) {
-            return $this->boxes[$boxID];
-        }
-
-        return null;
+        return $this->boxes[$boxID] ?? null;
     }
 
     /**
@@ -132,11 +128,7 @@ class BoxHandler extends SingletonFactory
      */
     public function getBoxes($position)
     {
-        if (isset($this->boxesByPosition[$position])) {
-            return $this->boxesByPosition[$position];
-        }
-
-        return [];
+        return $this->boxesByPosition[$position] ?? [];
     }
 
     /**
@@ -147,11 +139,7 @@ class BoxHandler extends SingletonFactory
      */
     public function getBoxByIdentifier($identifier)
     {
-        if (isset($this->boxesByIdentifier[$identifier])) {
-            return $this->boxesByIdentifier[$identifier];
-        }
-
-        return null;
+        return $this->boxesByIdentifier[$identifier] ?? null;
     }
 
     /**
index 7bbd38123646dffea7bfdefe3a3ea42948207d4f..66ccf8dbccdd8c7af84435cc297ee193513d0be0 100644 (file)
@@ -49,11 +49,7 @@ class CaptchaHandler extends SingletonFactory
      */
     public function getObjectType($objectTypeID)
     {
-        if (isset($this->objectTypes[$objectTypeID])) {
-            return $this->objectTypes[$objectTypeID];
-        }
-
-        return null;
+        return $this->objectTypes[$objectTypeID] ?? null;
     }
 
     /**
index b530e13af78d7ff1f1543e94fe08edb7e5bd5aeb..9fa53b4cabee79798e4f974cb8de1933fb8dd662 100644 (file)
@@ -142,11 +142,7 @@ abstract class AbstractCategoryType extends SingletonFactory implements ICategor
      */
     public function getObjectTypeName($definitionName)
     {
-        if (isset($this->objectTypes[$definitionName])) {
-            return $this->objectTypes[$definitionName];
-        }
-
-        return null;
+        return $this->objectTypes[$definitionName] ?? null;
     }
 
     /**
index 82ac329d535d54a34d3c42f164c5d388bf0b8b19..bf6f5dc616b5a4ed7d327bca504c5762a722e10c 100644 (file)
@@ -74,11 +74,7 @@ class CategoryHandler extends SingletonFactory
      */
     public function getCategory($categoryID)
     {
-        if (isset($this->categories[$categoryID])) {
-            return $this->categories[$categoryID];
-        }
-
-        return null;
+        return $this->categories[$categoryID] ?? null;
     }
 
     /**
@@ -133,11 +129,7 @@ class CategoryHandler extends SingletonFactory
      */
     public function getObjectTypeByName($objectType)
     {
-        if (isset($this->objectTypes[$objectType])) {
-            return $this->objectTypes[$objectType];
-        }
-
-        return null;
+        return $this->objectTypes[$objectType] ?? null;
     }
 
     /**
index b29aa0e064447b5bae95902637b671b94f860c9e..d6485d62e81e55a8392a41b5006950eca856cd7a 100644 (file)
@@ -160,11 +160,7 @@ class ClipboardHandler extends SingletonFactory
      */
     public function getObjectTypeID($typeName)
     {
-        if (isset($this->cache['objectTypeNames'][$typeName])) {
-            return $this->cache['objectTypeNames'][$typeName];
-        }
-
-        return null;
+        return $this->cache['objectTypeNames'][$typeName] ?? null;
     }
 
     /**
@@ -176,11 +172,7 @@ class ClipboardHandler extends SingletonFactory
      */
     public function getObjectType($objectTypeID)
     {
-        if (isset($this->cache['objectTypes'][$objectTypeID])) {
-            return $this->cache['objectTypes'][$objectTypeID];
-        }
-
-        return null;
+        return $this->cache['objectTypes'][$objectTypeID] ?? null;
     }
 
     /**
index 8a88783b15d79d6ab79878caf67d6d848f3e67a8..8d62ed74a227c7be09efed834f2e47e866b64ce4 100644 (file)
@@ -65,11 +65,7 @@ class CommentHandler extends SingletonFactory
      */
     public function getObjectTypeID($objectType)
     {
-        if (isset($this->cache['objectTypeIDs'][$objectType])) {
-            return $this->cache['objectTypeIDs'][$objectType];
-        }
-
-        return null;
+        return $this->cache['objectTypeIDs'][$objectType] ?? null;
     }
 
     /**
@@ -81,11 +77,7 @@ class CommentHandler extends SingletonFactory
      */
     public function getObjectType($objectTypeID)
     {
-        if (isset($this->cache['objectTypes'][$objectTypeID])) {
-            return $this->cache['objectTypes'][$objectTypeID];
-        }
-
-        return null;
+        return $this->cache['objectTypes'][$objectTypeID] ?? null;
     }
 
     /**
index 43e5531b6e43d44c839d92bc3186c4ba74195226..7b25ba19f43c1ee1bb1b4cf72c4803b44910d789 100644 (file)
@@ -407,11 +407,7 @@ class LabelHandler extends SingletonFactory
      */
     public function getLabelGroup($groupID)
     {
-        if (isset($this->labelGroups['groups'][$groupID])) {
-            return $this->labelGroups['groups'][$groupID];
-        }
-
-        return null;
+        return $this->labelGroups['groups'][$groupID] ?? null;
     }
 
     /**
index d45046780ba3194b322ec29622784444de106ad8..e9613aaabf38170ea88f1e14c6a5401da60c13b5 100644 (file)
@@ -131,11 +131,7 @@ class LanguageFactory extends SingletonFactory
      */
     public function getCategory($categoryName)
     {
-        if (isset($this->cache['categories'][$categoryName])) {
-            return $this->cache['categories'][$categoryName];
-        }
-
-        return null;
+        return $this->cache['categories'][$categoryName] ?? null;
     }
 
     /**
index 21e56477ced703b07c0aed842297a4c9f80919f1..94f3cf87efd2f635e858ccc4f359cb5be8bcebb3 100644 (file)
@@ -134,11 +134,7 @@ class QuotedMessage implements \Countable, \Iterator
      */
     public function getFullQuote($quoteID)
     {
-        if (isset($this->fullQuotes[$quoteID])) {
-            return $this->fullQuotes[$quoteID];
-        }
-
-        return null;
+        return $this->fullQuotes[$quoteID] ?? null;
     }
 
     /**
index 36c865c853868a8819d78d38656fd7a269e92d88..b5cfaa341a3bd760343f35a975da27da8fee98c6 100644 (file)
@@ -596,11 +596,7 @@ class PackageArchive
      */
     public function getAuthorInfo($name)
     {
-        if (isset($this->authorInfo[$name])) {
-            return $this->authorInfo[$name];
-        }
-
-        return null;
+        return $this->authorInfo[$name] ?? null;
     }
 
     /**
@@ -611,11 +607,7 @@ class PackageArchive
      */
     public function getPackageInfo($name)
     {
-        if (isset($this->packageInfo[$name])) {
-            return $this->packageInfo[$name];
-        }
-
-        return null;
+        return $this->packageInfo[$name] ?? null;
     }
 
     /**
@@ -987,11 +979,7 @@ class PackageArchive
      */
     public function getInstructions($type)
     {
-        if (isset($this->instructions[$type])) {
-            return $this->instructions[$type];
-        }
-
-        return null;
+        return $this->instructions[$type] ?? null;
     }
 
     /**
index 4321bdc0c60235af14fa2c609ae61119d4ed5549..8c56c8221ecd343817087203a27746204c10ec80 100644 (file)
@@ -130,11 +130,7 @@ class PackageValidationManager extends SingletonFactory
      */
     public function getVirtualPackage($package)
     {
-        if (isset($this->virtualPackageList[$package])) {
-            return $this->virtualPackageList[$package];
-        }
-
-        return null;
+        return $this->virtualPackageList[$package] ?? null;
     }
 
     /**
index 8154770f025276fb60bf31d5e9a56b38f4113b47..c0394173ead656bc5afe20cfa4e574af3fbd6ee1 100644 (file)
@@ -215,11 +215,7 @@ class ReactionHandler extends SingletonFactory
      */
     public function getObjectType($objectName)
     {
-        if (isset($this->cache[$objectName])) {
-            return $this->cache[$objectName];
-        }
-
-        return null;
+        return $this->cache[$objectName] ?? null;
     }
 
     /**
index e2a041a70424129d45ff6f29a62460aeb2afa1b3..e6f19216945cb379ae9c31bbc83088833ee8a124 100644 (file)
@@ -88,11 +88,7 @@ class RegistryHandler extends SingletonFactory
             $this->loadStorage([$package]);
         }
 
-        if (isset($this->cache[$packageID][$field])) {
-            return $this->cache[$packageID][$field];
-        }
-
-        return null;
+        return $this->cache[$packageID][$field] ?? null;
     }
 
     /**
index 5788b29b94cca254ec6d713c66ae175daa2a5910..9b9592ef1128fa5352ac5cc1ffdf9393e8dead72 100644 (file)
@@ -56,11 +56,7 @@ class ArticleSearch extends AbstractSearchableObjectType
      */
     public function getObject($objectID)
     {
-        if (isset($this->messageCache[$objectID])) {
-            return $this->messageCache[$objectID];
-        }
-
-        return null;
+        return $this->messageCache[$objectID] ?? null;
     }
 
     /**
index 1dcd4b2fc2d0fcec78d4e8eb4fcd97d6c24ef19c..d73adc8e7e009546ff6c4747505329f5c79acefc 100644 (file)
@@ -44,11 +44,7 @@ class PageSearch extends AbstractSearchableObjectType
      */
     public function getObject($objectID)
     {
-        if (isset($this->messageCache[$objectID])) {
-            return $this->messageCache[$objectID];
-        }
-
-        return null;
+        return $this->messageCache[$objectID] ?? null;
     }
 
     /**
index 85f990fcd04df49aaae5a136c1da778137e699f2..7dcf1e45787abbffe847e01bc53b2c84e3ac218f 100644 (file)
@@ -69,11 +69,7 @@ class SearchEngine extends SingletonFactory implements ISearchEngine
      */
     public function getObjectType($objectTypeName)
     {
-        if (isset($this->availableObjectTypes[$objectTypeName])) {
-            return $this->availableObjectTypes[$objectTypeName];
-        }
-
-        return null;
+        return $this->availableObjectTypes[$objectTypeName] ?? null;
     }
 
     /**
index 079592654e54698c9ee1b8b4a08679ea26cfcc71..6c33682436eceb560789557259a4c9710240a384 100644 (file)
@@ -48,11 +48,7 @@ class UserActivityEventHandler extends SingletonFactory
      */
     public function getObjectType($objectTypeID)
     {
-        if (isset($this->objectTypes['objects'][$objectTypeID])) {
-            return $this->objectTypes['objects'][$objectTypeID];
-        }
-
-        return null;
+        return $this->objectTypes['objects'][$objectTypeID] ?? null;
     }
 
     /**
@@ -63,11 +59,7 @@ class UserActivityEventHandler extends SingletonFactory
      */
     public function getObjectTypeID($objectType)
     {
-        if (isset($this->objectTypes['names'][$objectType])) {
-            return $this->objectTypes['names'][$objectType];
-        }
-
-        return null;
+        return $this->objectTypes['names'][$objectType] ?? null;
     }
 
     /**
index 04c60b9f2a19b40f858d5d9da8e7b14e8112c393..e379c843a6dedbcda18cb15d171acf52b1f5249d 100644 (file)
@@ -271,11 +271,7 @@ class UserActivityPointHandler extends SingletonFactory
      */
     public function getObjectTypeByName($objectType)
     {
-        if (isset($this->objectTypes[$objectType])) {
-            return $this->objectTypes[$objectType];
-        }
-
-        return null;
+        return $this->objectTypes[$objectType] ?? null;
     }
 
     /**
index 051aac39c18b1be4b311b78145c72e56513ffa81..a980bb7ade8d11c8d7ff21feb24fcd1d60ecd9ab 100644 (file)
@@ -75,11 +75,7 @@ class UserCollapsibleContentHandler extends SingletonFactory
      */
     public function getObjectTypeID($objectType)
     {
-        if (isset($this->cache['objectTypeIDs'][$objectType])) {
-            return $this->cache['objectTypeIDs'][$objectType];
-        }
-
-        return null;
+        return $this->cache['objectTypeIDs'][$objectType] ?? null;
     }
 
     /**
index 9d36c6e0e5e4a320dad17b6b3b24d233c1dc8aff..48154678921a26ef3862fcfadc28687b2d2b4efe 100644 (file)
@@ -703,11 +703,7 @@ class UserNotificationHandler extends SingletonFactory
      */
     public function getObjectTypeProcessor($objectType)
     {
-        if (isset($this->availableObjectTypes[$objectType])) {
-            return $this->availableObjectTypes[$objectType];
-        }
-
-        return null;
+        return $this->availableObjectTypes[$objectType] ?? null;
     }
 
     /**