Add explicit `return null;` statements
authorMatthias Schmidt <gravatronics@live.com>
Tue, 27 Apr 2021 15:04:15 +0000 (17:04 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 27 Apr 2021 15:04:18 +0000 (17:04 +0200)
105 files changed:
.php_cs.dist
wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php
wcfsetup/install/files/lib/data/article/Article.class.php
wcfsetup/install/files/lib/data/article/LikeableArticle.class.php
wcfsetup/install/files/lib/data/article/ViewableArticle.class.php
wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php
wcfsetup/install/files/lib/data/bbcode/BBCodeCache.class.php
wcfsetup/install/files/lib/data/blacklist/status/BlacklistStatus.class.php
wcfsetup/install/files/lib/data/box/content/BoxContent.class.php
wcfsetup/install/files/lib/data/category/AbstractDecoratedCategory.class.php
wcfsetup/install/files/lib/data/label/group/ViewableLabelGroup.class.php
wcfsetup/install/files/lib/data/like/object/AbstractLikeObject.class.php
wcfsetup/install/files/lib/data/menu/MenuCache.class.php
wcfsetup/install/files/lib/data/moderation/queue/ViewableModerationQueue.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/Page.class.php
wcfsetup/install/files/lib/data/page/PageCache.class.php
wcfsetup/install/files/lib/data/page/content/PageContent.class.php
wcfsetup/install/files/lib/data/page/content/SearchResultPageContent.class.php
wcfsetup/install/files/lib/data/paid/subscription/transaction/log/PaidSubscriptionTransactionLog.class.php
wcfsetup/install/files/lib/data/paid/subscription/user/PaidSubscriptionUser.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/style/Style.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/data/user/notification/UserNotification.class.php
wcfsetup/install/files/lib/data/user/profile/visitor/UserProfileVisitor.class.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/acl/ACLHandler.class.php
wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php
wcfsetup/install/files/lib/system/attachment/AbstractAttachmentObjectType.class.php
wcfsetup/install/files/lib/system/box/AbstractBoxController.class.php
wcfsetup/install/files/lib/system/box/BoxHandler.class.php
wcfsetup/install/files/lib/system/box/TodaysBirthdaysBoxController.class.php
wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.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/condition/AbstractCheckboxCondition.class.php
wcfsetup/install/files/lib/system/condition/AbstractIntegerCondition.class.php
wcfsetup/install/files/lib/system/condition/AbstractMultiSelectCondition.class.php
wcfsetup/install/files/lib/system/condition/AbstractSelectCondition.class.php
wcfsetup/install/files/lib/system/condition/AbstractTextCondition.class.php
wcfsetup/install/files/lib/system/condition/AbstractTimestampCondition.class.php
wcfsetup/install/files/lib/system/condition/TimeCondition.class.php
wcfsetup/install/files/lib/system/condition/UserBirthdayCondition.class.php
wcfsetup/install/files/lib/system/condition/UserGroupCondition.class.php
wcfsetup/install/files/lib/system/condition/UserLanguageCondition.class.php
wcfsetup/install/files/lib/system/condition/UserMobileBrowserCondition.class.php
wcfsetup/install/files/lib/system/condition/UserMultifactorCondition.class.php
wcfsetup/install/files/lib/system/condition/UserOptionsCondition.class.php
wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php
wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php
wcfsetup/install/files/lib/system/condition/UserTrophyCondition.class.php
wcfsetup/install/files/lib/system/condition/UserUserIDCondition.class.php
wcfsetup/install/files/lib/system/condition/page/MultiPageCondition.class.php
wcfsetup/install/files/lib/system/condition/user/UserLastActivityTimeIntervalDaysCondition.class.php
wcfsetup/install/files/lib/system/database/statement/PreparedStatement.class.php
wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php
wcfsetup/install/files/lib/system/database/table/column/TDecimalsDatabaseTableColumn.class.php
wcfsetup/install/files/lib/system/database/table/column/TLengthDatabaseTableColumn.class.php
wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/file/upload/UploadHandler.class.php
wcfsetup/install/files/lib/system/form/builder/TFormParentNode.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/log/modification/ModificationLogHandler.class.php
wcfsetup/install/files/lib/system/menu/TreeMenu.class.php
wcfsetup/install/files/lib/system/menu/user/profile/UserProfileMenu.class.php
wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php
wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php
wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php
wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php
wcfsetup/install/files/lib/system/moderation/queue/report/ArticleModerationQueueReportHandler.class.php
wcfsetup/install/files/lib/system/moderation/queue/report/UserModerationQueueReportHandler.class.php
wcfsetup/install/files/lib/system/package/PackageArchive.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationFormManager.class.php
wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/AbstractPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/validation/PackageValidationManager.class.php
wcfsetup/install/files/lib/system/poll/PollManager.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/request/ControllerMap.class.php
wcfsetup/install/files/lib/system/search/AbstractSearchableObjectType.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/sitemap/object/AbstractSitemapObjectObjectType.class.php
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php
wcfsetup/install/files/lib/system/style/StyleHandler.class.php
wcfsetup/install/files/lib/system/tagging/AbstractCombinedTaggable.class.php
wcfsetup/install/files/lib/system/upload/UploadFile.class.php
wcfsetup/install/files/lib/system/upload/UploadHandler.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
wcfsetup/install/files/lib/system/user/notification/object/PaidSubscriptionUserUserNotificationObject.class.php
wcfsetup/install/files/lib/util/DOMUtil.class.php

index 722d780082e1db273bdd57641d323fd347174e56..c107c1f55ce84fa5293d7e9c1f35f1dd962584f3 100644 (file)
@@ -101,7 +101,6 @@ return (new PhpCsFixer\Config())
 
         'no_useless_return' => true,
         'return_assignment' => true,
-        'simplified_null_return' => true,
 
         'multiline_whitespace_before_semicolons' => true,
         'no_empty_statement' => true,
index 3e280f48feac526f5a98a6170606df3bcd473ec6..6339abc9727496ffe90ee1145b386d8d325839ae 100644 (file)
@@ -63,6 +63,8 @@ abstract class AbstractAcpForm extends AbstractForm
         if (isset($this->i18nValues[$fieldName])) {
             return $this->i18nValues[$fieldName];
         }
+
+        return null;
     }
 
     /**
index 7378d130eccec0037666305a95183046a4190afd..d956daec942da6eeedf989fb5a6ebaae7c342f42 100644 (file)
@@ -250,6 +250,8 @@ class Article extends DatabaseObject implements ILinkableObject, IUserContent
                 return $this->articleContents[0];
             }
         }
+
+        return null;
     }
 
     /**
index 68e02951d8e3547d979125e59299db9be4bdab8e..1d88060f3a567cc6db2619134265925a5ee0c873 100644 (file)
@@ -75,6 +75,7 @@ class LikeableArticle extends AbstractLikeObject implements IReactionObject
      */
     public function getLanguageID()
     {
+        return null;
     }
 
     /**
index 9004c2d2c236ba1f7a0438c56adf36b65dd02671..f067969dbfa4ceaa8793330f64846c24f9668dfe 100644 (file)
@@ -136,6 +136,8 @@ class ViewableArticle extends DatabaseObjectDecorator
         if ($this->getArticleContent() !== null) {
             return $this->getArticleContent()->getImage();
         }
+
+        return null;
     }
 
     /**
@@ -148,6 +150,8 @@ class ViewableArticle extends DatabaseObjectDecorator
         if ($this->getArticleContent() !== null) {
             return $this->getArticleContent()->getTeaserImage();
         }
+
+        return null;
     }
 
     /**
index 5adc9ddfcd8f526d5324234f5516639880d1cd80..5bc65c472f1fe71d803cd0aaaeef33e47e0b8b09 100644 (file)
@@ -160,6 +160,8 @@ class ArticleContent extends DatabaseObject implements ILinkableObject, IRouteCo
         if ($this->languageID) {
             return LanguageFactory::getInstance()->getLanguage($this->languageID);
         }
+
+        return null;
     }
 
     /**
@@ -220,5 +222,7 @@ class ArticleContent extends DatabaseObject implements ILinkableObject, IRouteCo
         if (($row = $statement->fetchSingleRow()) !== false) {
             return new self(null, $row);
         }
+
+        return null;
     }
 }
index 9a8d5dd55d454958fa69eb05008a1f0f8c0344d5..8c0912ad844835e2a9b4f6e40c24dd4cd4fc9b6c 100644 (file)
@@ -59,6 +59,8 @@ class BBCodeCache extends SingletonFactory
         if (isset($this->cachedBBCodes[$tag])) {
             return $this->cachedBBCodes[$tag];
         }
+
+        return null;
     }
 
     /**
index 62f9bf99de77985e97efcf6983fbc399936925e3..eb1bf117fd1d01105315b7e6eecede9a249607f1 100644 (file)
@@ -103,7 +103,7 @@ class BlacklistStatus extends DatabaseObject
             ) {
                 \wcf\functions\exception\logThrowable($e);
 
-                return;
+                return null;
             }
 
             throw $e;
@@ -144,5 +144,7 @@ class BlacklistStatus extends DatabaseObject
                 }
             }
         }
+
+        return null;
     }
 }
index f81f3048db5da9cef222bb0d7edab99f7741b3d0..093e7cc0b1ace7cba9999fe0bfbe9f5a1466fb46 100644 (file)
@@ -71,6 +71,8 @@ class BoxContent extends DatabaseObject
         if (($row = $statement->fetchSingleRow()) !== false) {
             return new self(null, $row);
         }
+
+        return null;
     }
 
     /**
index bebdfa508b80851078b9a85cd079afa8733baa98..6a3f3517d055e7b92b0a39cc957513a784843758 100644 (file)
@@ -138,5 +138,7 @@ abstract class AbstractDecoratedCategory extends DatabaseObjectDecorator
         if ($category) {
             return new static($category);
         }
+
+        return null;
     }
 }
index cf1143b43358e498d0fa7c52ddf079fdf4e9ca85..e0119da00d8b79e979b36eb5e77e6b7a650b998e 100644 (file)
@@ -168,6 +168,8 @@ class ViewableLabelGroup extends DatabaseObjectDecorator implements \Countable,
         if (isset($this->labels[$labelID])) {
             return $this->labels[$labelID];
         }
+
+        return null;
     }
 
     /**
index baf46637cfa425c4b98796d0272e1baa3b4ca92d..db11fa2ed1c0446b012d99a902e35b94be334e2a 100644 (file)
@@ -67,5 +67,6 @@ abstract class AbstractLikeObject extends DatabaseObjectDecorator implements ILi
      */
     public function getLanguageID()
     {
+        return null;
     }
 }
index 07f0ecdcbe63bd6989cc5c15a2e5e980301cc423..d462d210174f464d256207709895afef754d8e3c 100644 (file)
@@ -47,6 +47,8 @@ class MenuCache extends SingletonFactory
         if (isset($this->cachedMenus[$menuID])) {
             return $this->cachedMenus[$menuID];
         }
+
+        return null;
     }
 
     /**
@@ -60,6 +62,8 @@ class MenuCache extends SingletonFactory
         if (isset($this->cachedMenuItems[$menuID])) {
             return $this->cachedMenuItems[$menuID];
         }
+
+        return null;
     }
 
     /**
index 8c26dad7c1962281bd7833c29a901c331e7f6593..b807a230910c37a2b31a62e582211653be47eee0 100644 (file)
@@ -128,6 +128,8 @@ class ViewableModerationQueue extends DatabaseObjectDecorator implements ILinkab
         if ($this->assignedUserID) {
             return UserProfileRuntimeCache::getInstance()->getObject($this->assignedUserID);
         }
+
+        return null;
     }
 
     /**
index e879f5b650dd5e5624352027e5fcfd6ae2b86cf1..45afbfcf149edafe7723c70bc60a0d57dd4b8cd6 100644 (file)
@@ -68,13 +68,15 @@ class ObjectTypeCache extends SingletonFactory
      * object type definition exists.
      *
      * @param int $definitionID
-     * @return  ObjectTypeDefinition
+     * @return  ObjectTypeDefinition|null
      */
     public function getDefinition($definitionID)
     {
         if (isset($this->definitions[$definitionID])) {
             return $this->definitions[$definitionID];
         }
+
+        return null;
     }
 
     /**
@@ -82,13 +84,15 @@ class ObjectTypeCache extends SingletonFactory
      * such object type definition exists.
      *
      * @param string $definitionName
-     * @return  ObjectTypeDefinition
+     * @return  ObjectTypeDefinition|null
      */
     public function getDefinitionByName($definitionName)
     {
         if (isset($this->definitionsByName[$definitionName])) {
             return $this->definitionsByName[$definitionName];
         }
+
+        return null;
     }
 
     /**
@@ -96,7 +100,7 @@ class ObjectTypeCache extends SingletonFactory
      * category name is invalid.
      *
      * @param string $categoryName
-     * @return  ObjectTypeDefinition[]
+     * @return  ObjectTypeDefinition[]|null
      */
     public function getDefinitionsByCategory($categoryName)
     {
@@ -108,6 +112,8 @@ class ObjectTypeCache extends SingletonFactory
 
             return $definitions;
         }
+
+        return null;
     }
 
     /**
@@ -115,13 +121,15 @@ class ObjectTypeCache extends SingletonFactory
      * exists.
      *
      * @param int $objectTypeID
-     * @return  ObjectType
+     * @return  ObjectType|null
      */
     public function getObjectType($objectTypeID)
     {
         if (isset($this->objectTypes[$objectTypeID])) {
             return $this->objectTypes[$objectTypeID];
         }
+
+        return null;
     }
 
     /**
@@ -145,7 +153,7 @@ class ObjectTypeCache extends SingletonFactory
      *
      * @param string $definitionName
      * @param string $objectTypeName
-     * @return  ObjectType
+     * @return  ObjectType|null
      */
     public function getObjectTypeByName($definitionName, $objectTypeName)
     {
@@ -155,6 +163,8 @@ class ObjectTypeCache extends SingletonFactory
         ) {
             return $this->groupedObjectTypes[$definitionName][$objectTypeName];
         }
+
+        return null;
     }
 
     /**
@@ -162,7 +172,7 @@ class ObjectTypeCache extends SingletonFactory
      *
      * @param string $definitionName
      * @param string $objectTypeName
-     * @return  int
+     * @return  int|null
      */
     public function getObjectTypeIDByName($definitionName, $objectTypeName)
     {
@@ -170,6 +180,8 @@ class ObjectTypeCache extends SingletonFactory
         if ($objectType !== null) {
             return $objectType->objectTypeID;
         }
+
+        return null;
     }
 
     /**
index ae8ab75dec173b8593d687693d19b12a0ea560d0..9532be69d96a181620f31e0ad4e6fd4bb00ee4f8 100644 (file)
@@ -33,26 +33,30 @@ class PackageCache extends SingletonFactory
      * Returns a specific package.
      *
      * @param int $packageID
-     * @return  Package
+     * @return  Package|null
      */
     public function getPackage($packageID)
     {
         if (isset($this->packages['packages'][$packageID])) {
             return $this->packages['packages'][$packageID];
         }
+
+        return null;
     }
 
     /**
      * Returns the id of a specific package or 'null' if not found.
      *
      * @param string $package
-     * @return  string
+     * @return  string|null
      */
     public function getPackageID($package)
     {
         if (isset($this->packages['packageIDs'][$package])) {
             return $this->packages['packageIDs'][$package];
         }
+
+        return null;
     }
 
     /**
index 65bfc40cd3078cf140397c96fd4590f14558d89a..95996eb862c1e02cc183088430440bdfc8299141 100644 (file)
@@ -166,6 +166,8 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
         if ($row !== false) {
             return new PageContent(null, $row);
         }
+
+        return null;
     }
 
     /**
index aa5fafb686dd2558204cb9b160e49a0cd92e495f..74cab579c62485a24cff3a28724ce607727708be 100644 (file)
@@ -52,6 +52,8 @@ class PageCache extends SingletonFactory
         if (isset($this->cache['pages'][$pageID])) {
             return $this->cache['pages'][$pageID];
         }
+
+        return null;
     }
 
     /**
@@ -65,6 +67,8 @@ class PageCache extends SingletonFactory
         if (isset($this->cache['controller'][$controller])) {
             return $this->getPage($this->cache['controller'][$controller]);
         }
+
+        return null;
     }
 
     /**
@@ -78,6 +82,8 @@ class PageCache extends SingletonFactory
         if (isset($this->cache['identifier'][$identifier])) {
             return $this->getPage($this->cache['identifier'][$identifier]);
         }
+
+        return null;
     }
 
     /**
index c9d4e14968aa94e55f9a922f2d682af6f9d01739..490a20f030457888f47bd0f000da1a11a950726a 100644 (file)
@@ -129,6 +129,8 @@ class PageContent extends DatabaseObject implements ITitledLinkObject
         if (($row = $statement->fetchSingleRow()) !== false) {
             return new self(null, $row);
         }
+
+        return null;
     }
 
     /**
index 048d541b80063876451121349a5ee280cebfb867..8a68913a3161bb02a0cdddfeeddeaee81a34da49 100644 (file)
@@ -31,6 +31,7 @@ class SearchResultPageContent extends DatabaseObjectDecorator implements ISearch
      */
     public function getUserProfile()
     {
+        return null;
     }
 
     /**
index 5c185e6bb2f64dfcbe52d5fab3505e05c7a32083..76284b8ce898ba579ebdd32b4bf3b88e2ffc79e0 100644 (file)
@@ -109,5 +109,7 @@ class PaidSubscriptionTransactionLog extends DatabaseObject
         if ($row !== false) {
             return new self(null, $row);
         }
+
+        return null;
     }
 }
index f3f7769ea6198464dda3ab82da5a2e4cde9b54f5..48d1aa70ba1980534a1f8e235513908fc02d17b4 100644 (file)
@@ -99,5 +99,7 @@ class PaidSubscriptionUser extends DatabaseObject
         if ($row !== false) {
             return new self(null, $row);
         }
+
+        return null;
     }
 }
index d55644e23b7d2775373128ac3bebc8da97aa37e7..cd2143e1474f66a8717f56d6fd2688875bab276a 100644 (file)
@@ -34,13 +34,15 @@ class ReactionTypeCache extends SingletonFactory
      * Returns the reaction type with the given reactionTypeID.
      *
      * @param int $reactionTypeID
-     * @return  ReactionType
+     * @return  ReactionType|null
      */
     public function getReactionTypeByID($reactionTypeID)
     {
         if (isset($this->reactionTypes[$reactionTypeID])) {
             return $this->reactionTypes[$reactionTypeID];
         }
+
+        return null;
     }
 
     /**
index 0e120a4c4e73fa9e08da195017414f04162d156b..dc7a144c5bfd2b5447ab2eabcf172314ee96d8aa 100644 (file)
@@ -88,6 +88,8 @@ class SmileyCache extends SingletonFactory
         if (isset($this->cachedSmileyByCode[$code])) {
             return $this->cachedSmileyByCode[$code];
         }
+
+        return null;
     }
 
     /**
index 01b2353c5b9544357cdac455245d3a4180afddfd..be269fb652e9e46d6ae73ec325f217a0f1558c05 100644 (file)
@@ -105,7 +105,7 @@ class Style extends DatabaseObject
      *
      * @param string $variableName
      * @param bool $toHex
-     * @return  string
+     * @return  string|null
      */
     public function getVariable($variableName, $toHex = false)
     {
@@ -148,6 +148,8 @@ class Style extends DatabaseObject
 
             return $this->variables[$variableName];
         }
+
+        return null;
     }
 
     /**
index aa1a9d69855085080c84918df13ff679d9bbf1dd..3036386ba20c956ad7c24e2c82b9e38d952b296c 100644 (file)
@@ -47,13 +47,15 @@ class TrophyCache extends SingletonFactory
      * Returns the trophy with the given trophyID.
      *
      * @param int $trophyID
-     * @return  Trophy
+     * @return  Trophy|null
      */
     public function getTrophyByID($trophyID)
     {
         if (isset($this->trophies[$trophyID])) {
             return $this->trophies[$trophyID];
         }
+
+        return null;
     }
 
     /**
index 667cec2345d4675e477ec7a895807cefd5b8fd7d..087b451309733b7dae3a54ddf816a746c8f0ff7b 100644 (file)
@@ -58,6 +58,8 @@ class TrophyCategoryCache extends SingletonFactory
         if (isset($this->categories[$categoryID])) {
             return $this->categories[$categoryID];
         }
+
+        return null;
     }
 
     /**
index d0045c269381371f7898742cebb6910b50040c37..83a0280fcd6b4a33730ca25e2a0972c2e2ac8bed 100644 (file)
@@ -185,6 +185,8 @@ class UserGroup extends DatabaseObject implements ITitledObject
         if (isset(self::$cache['groups'][$groupID])) {
             return self::$cache['groups'][$groupID];
         }
+
+        return null;
     }
 
     /**
index 72362fc75a25bf365a29d7a97698443a3140a140..bfb85758944b50b5c1bd2924c2f0cbb2e896f4e5 100644 (file)
@@ -64,7 +64,7 @@ class UserNotification extends DatabaseObject
      * @param int $packageID
      * @param int $eventID
      * @param int $objectID
-     * @return  UserNotification
+     * @return  UserNotification|null
      */
     public static function getNotification($packageID, $eventID, $objectID)
     {
@@ -79,5 +79,7 @@ class UserNotification extends DatabaseObject
         if ($row !== false) {
             return new self(null, $row);
         }
+
+        return null;
     }
 }
index 8a0dec23adbda7af89b77419d230163c78af9891..c09c88f360ea74706bd6b8c142935c56a6f7c1f5 100644 (file)
@@ -38,5 +38,7 @@ class UserProfileVisitor extends DatabaseObject
         if ($row = $statement->fetchArray()) {
             return new self(null, $row);
         }
+
+        return null;
     }
 }
index 14f3a0cfe4a1e02e920f236860f38098f387b937..653a33fc24ad1f80c840c21aae7e902786654e73 100644 (file)
@@ -750,6 +750,8 @@ class WCF
         if (isset(self::$applicationObjects[$application->packageID])) {
             return self::$applicationObjects[$application->packageID];
         }
+
+        return null;
     }
 
     /**
@@ -949,13 +951,15 @@ class WCF
      * Searches for cached core object definition.
      *
      * @param string $className
-     * @return  string
+     * @return  string|null
      */
     final protected static function getCoreObject($className)
     {
         if (isset(self::$coreObjectCache[$className])) {
             return self::$coreObjectCache[$className];
         }
+
+        return null;
     }
 
     /**
index 4def79a46b8bca9e3468e9ec7eea3a3a86e2c06c..88ba131053132b29292bbad59881de21b2b87846 100644 (file)
@@ -221,6 +221,8 @@ class ACLHandler extends SingletonFactory
         if (isset($this->categories[$objectTypeID][$categoryName])) {
             return $this->categories[$objectTypeID][$categoryName];
         }
+
+        return null;
     }
 
     /**
index 9edd53986c5e9ba4e3a7a32a8f0928bebbee180d..79ed95dcfe1fa0e730cf841bdb723b90ac2c70af 100644 (file)
@@ -70,6 +70,8 @@ class ApplicationHandler extends SingletonFactory
                 return $this->cache['application'][$packageID];
             }
         }
+
+        return null;
     }
 
     /**
@@ -89,6 +91,8 @@ class ApplicationHandler extends SingletonFactory
         if (isset($this->cache['application'][$packageID])) {
             return $this->cache['application'][$packageID];
         }
+
+        return null;
     }
 
     /**
@@ -188,6 +192,8 @@ class ApplicationHandler extends SingletonFactory
                 return $abbreviation;
             }
         }
+
+        return null;
     }
 
     /**
index aea8040aba7254b7b803afd2e8e5ca3cc142bd3d..dc60d79afeb92d21c74b93f9861deec525163ed1 100644 (file)
@@ -62,6 +62,8 @@ abstract class AbstractAttachmentObjectType implements IAttachmentObjectType
         if (isset($this->cachedObjects[$objectID])) {
             return $this->cachedObjects[$objectID];
         }
+
+        return null;
     }
 
     /**
index f441fb9c3dfc0b50c2d50a820288ba8b091f1005..6719961129f23b1e275f65c334da05d06d904abc 100644 (file)
@@ -74,6 +74,7 @@ abstract class AbstractBoxController implements IBoxController
      */
     public function getImage()
     {
+        return null;
     }
 
     /**
@@ -125,6 +126,7 @@ abstract class AbstractBoxController implements IBoxController
      */
     public function getTitle()
     {
+        return null;
     }
 
     /**
index 0d86022da4083cf1a9c1167b2f60a4a73ff2a7da..feb742c27e3514a81dbcb57663b27a00f63cd130 100644 (file)
@@ -120,6 +120,8 @@ class BoxHandler extends SingletonFactory
         if (isset($this->boxes[$boxID])) {
             return $this->boxes[$boxID];
         }
+
+        return null;
     }
 
     /**
@@ -148,6 +150,8 @@ class BoxHandler extends SingletonFactory
         if (isset($this->boxesByIdentifier[$identifier])) {
             return $this->boxesByIdentifier[$identifier];
         }
+
+        return null;
     }
 
     /**
index 5caca0da74de6a2e5d9214d01474fc0d399d0206..f5c9f02bd42b7da8e92f000231d269b81e28c9b5 100644 (file)
@@ -63,6 +63,7 @@ class TodaysBirthdaysBoxController extends AbstractDatabaseObjectListBoxControll
      */
     protected function getObjectList()
     {
+        return null;
     }
 
     /**
index a035d24f4107d98513045207761c44a4ed3fb5e5..56a84f817dc45b99f33d4f20472ceaa16ad339b1 100644 (file)
@@ -52,6 +52,7 @@ class WhoWasOnlineBoxController extends AbstractDatabaseObjectListBoxController
      */
     protected function getObjectList()
     {
+        return null;
     }
 
     /**
index 8ee35e500de6ffe81ef5405c317bad1b3ce06ebf..7bbd38123646dffea7bfdefe3a3ea42948207d4f 100644 (file)
@@ -52,6 +52,8 @@ class CaptchaHandler extends SingletonFactory
         if (isset($this->objectTypes[$objectTypeID])) {
             return $this->objectTypes[$objectTypeID];
         }
+
+        return null;
     }
 
     /**
index fac48dea8668b55c227a81ebc69fa3ec48459901..b530e13af78d7ff1f1543e94fe08edb7e5bd5aeb 100644 (file)
@@ -145,6 +145,8 @@ abstract class AbstractCategoryType extends SingletonFactory implements ICategor
         if (isset($this->objectTypes[$definitionName])) {
             return $this->objectTypes[$definitionName];
         }
+
+        return null;
     }
 
     /**
index 1e98ff3107a9a22e1147acef56ff7465e40a959d..82ac329d535d54a34d3c42f164c5d388bf0b8b19 100644 (file)
@@ -77,6 +77,8 @@ class CategoryHandler extends SingletonFactory
         if (isset($this->categories[$categoryID])) {
             return $this->categories[$categoryID];
         }
+
+        return null;
     }
 
     /**
@@ -119,6 +121,8 @@ class CategoryHandler extends SingletonFactory
         if (isset($this->objectTypeIDs[$objectTypeID])) {
             return $this->getObjectTypeByName($this->objectTypeIDs[$objectTypeID]);
         }
+
+        return null;
     }
 
     /**
@@ -132,6 +136,8 @@ class CategoryHandler extends SingletonFactory
         if (isset($this->objectTypes[$objectType])) {
             return $this->objectTypes[$objectType];
         }
+
+        return null;
     }
 
     /**
index fa9f4887cb7e68f8365ff2a68309fd8603e2b0a7..b29aa0e064447b5bae95902637b671b94f860c9e 100644 (file)
@@ -163,6 +163,8 @@ class ClipboardHandler extends SingletonFactory
         if (isset($this->cache['objectTypeNames'][$typeName])) {
             return $this->cache['objectTypeNames'][$typeName];
         }
+
+        return null;
     }
 
     /**
@@ -177,6 +179,8 @@ class ClipboardHandler extends SingletonFactory
         if (isset($this->cache['objectTypes'][$objectTypeID])) {
             return $this->cache['objectTypes'][$objectTypeID];
         }
+
+        return null;
     }
 
     /**
@@ -193,6 +197,8 @@ class ClipboardHandler extends SingletonFactory
                 return $objectTypeID;
             }
         }
+
+        return null;
     }
 
     /**
index 100d88a3343de1db0d15f03a22e4f79c6b9b346b..8a88783b15d79d6ab79878caf67d6d848f3e67a8 100644 (file)
@@ -68,6 +68,8 @@ class CommentHandler extends SingletonFactory
         if (isset($this->cache['objectTypeIDs'][$objectType])) {
             return $this->cache['objectTypeIDs'][$objectType];
         }
+
+        return null;
     }
 
     /**
@@ -82,6 +84,8 @@ class CommentHandler extends SingletonFactory
         if (isset($this->cache['objectTypes'][$objectTypeID])) {
             return $this->cache['objectTypes'][$objectTypeID];
         }
+
+        return null;
     }
 
     /**
index 8aa03873d87723d28d39726c2fb803baddeb1025..4cc440e4f70d94a2235ddb27ed153219da3dbfb5 100644 (file)
@@ -51,6 +51,8 @@ abstract class AbstractCheckboxCondition extends AbstractSingleFieldCondition
         if ($this->fieldValue) {
             return [$this->fieldName => $this->fieldValue];
         }
+
+        return null;
     }
 
     /**
index 35778d8f504487455159b69ed836aeb93c11724c..0361036bb64ddfc755bc672abf178f8297dedaab 100644 (file)
@@ -69,6 +69,8 @@ abstract class AbstractIntegerCondition extends AbstractSingleFieldCondition
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
@@ -152,6 +154,8 @@ HTML;
         if ($this->maxValue !== null) {
             return $this->maxValue;
         }
+
+        return null;
     }
 
     /**
@@ -188,6 +192,8 @@ HTML;
         if ($this->minValue !== null) {
             return $this->minValue;
         }
+
+        return null;
     }
 
     /**
index f3e43b970186069bb507d984ba2dae3db8120b9e..d8bfa9706bcad85d22c236e763eff7e512e13d41 100644 (file)
@@ -31,6 +31,8 @@ abstract class AbstractMultiSelectCondition extends AbstractSelectCondition
         if (!empty($this->fieldValue)) {
             return [$this->fieldName => $this->fieldValue];
         }
+
+        return null;
     }
 
     /**
index 8df793c54b792e4bad07a546bea1f6c60ba2bd7c..c358662aa31e46588072015453bc70bf9ebfd757 100644 (file)
@@ -43,6 +43,8 @@ abstract class AbstractSelectCondition extends AbstractSingleFieldCondition
         if ($this->fieldValue != self::NO_SELECTION_VALUE) {
             return [$this->fieldName => $this->fieldValue];
         }
+
+        return null;
     }
 
     /**
index 9a23460e2c88138bfae064f25e1e9836efb1ad61..8177e05e321cb6889cc113a8ccaa8ceefaf9a683 100644 (file)
@@ -35,6 +35,8 @@ abstract class AbstractTextCondition extends AbstractSingleFieldCondition
         if (\mb_strlen($this->fieldValue)) {
             return [$this->fieldName => $this->fieldValue];
         }
+
+        return null;
     }
 
     /**
index b10f993f6dc09d8ee3f22bb8e4fc1be335bd64b4..5ffc0ff1e52b35fd7fdecf51ba1fa3cb272e1931 100644 (file)
@@ -131,6 +131,8 @@ abstract class AbstractTimestampCondition extends AbstractSingleFieldCondition i
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
index 74289d2e0ffd4b8632f07c48e82a34300e2dfe7f..48428edc4551612d77732980fd322f833acdb5fd 100644 (file)
@@ -65,6 +65,8 @@ class TimeCondition extends AbstractMultipleFieldsCondition implements IContentC
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
index 71c707a912f535c918ab1c6986472d45700618a9..6877b5f4be424e79e68e27a32a17b4b85fd93e18 100644 (file)
@@ -30,6 +30,8 @@ class UserBirthdayCondition extends AbstractCondition implements IContentConditi
         if ($this->birthdayToday) {
             return ['birthdayToday' => 1];
         }
+
+        return null;
     }
 
     /**
index 817d4663dce8385ee0e14caa1b486593aa9df3f2..2e2cf266581bc0118074cbf2aadb0d0bbfe1f525 100644 (file)
@@ -141,6 +141,8 @@ class UserGroupCondition extends AbstractMultipleFieldsCondition implements
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
index 07e048645b313f32ba7e858b1a34d6e7678ccfa7..c5503a8460318199b54ae27fdf3cc59894460fc9 100644 (file)
@@ -75,6 +75,8 @@ class UserLanguageCondition extends AbstractSingleFieldCondition implements
                 'languageIDs' => $this->languageIDs,
             ];
         }
+
+        return null;
     }
 
     /**
index 449144c1cf948a1e8c5d128f819bfdf41453dc20..fb532a810d430955b72c17461834bb6eee278a67 100644 (file)
@@ -46,6 +46,8 @@ class UserMobileBrowserCondition extends AbstractSingleFieldCondition implements
                 'usesMobileBrowser' => $this->usesMobileBrowser,
             ];
         }
+
+        return null;
     }
 
     /**
index 32ff7cdbc9ffb5b0b2a91dcd24aec4a54492af5f..8a65ad5ab26da43137f2058964459b1cea7a4f16 100644 (file)
@@ -55,6 +55,8 @@ class UserMultifactorCondition extends AbstractSingleFieldCondition implements
                 'multifactorActive' => $this->multifactorActive,
             ];
         }
+
+        return null;
     }
 
     /**
index e91cbf60fdb88b78d19437ab4138b0f2e28aa85d..068eb0632bc71684c0311cfbf0b6930124a099a2 100644 (file)
@@ -126,6 +126,8 @@ class UserOptionsCondition extends AbstractMultipleFieldsCondition implements
                 'optionValues' => $data,
             ];
         }
+
+        return null;
     }
 
     /**
index 844c48b04bea4a2fd740c7624ec181f2bc9486b5..e243956ab83bd2198403b518704c645f40fbb965 100644 (file)
@@ -102,6 +102,8 @@ class UserRegistrationDateCondition extends AbstractSingleFieldCondition impleme
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
index 4506f73a77c3a90aeb0f89bb22c96fe8862ab555..2dbd56678890328595bc2907a483bebe7ce191af 100644 (file)
@@ -157,6 +157,8 @@ class UserStateCondition extends AbstractSingleFieldCondition implements
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
index 56fe1fa3b43bbff2ee126c74e4c9625869a4d4d8..8df5a6418243d8b56f5896198cc66c171412a268 100644 (file)
@@ -139,6 +139,8 @@ class UserTrophyCondition extends AbstractMultipleFieldsCondition implements
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
index 849461d4bbd3718e68b9bea363e90b08165dd859..943624b5ab824add1585b3f32e9c5983dbb49216 100644 (file)
@@ -92,6 +92,8 @@ class UserUserIDCondition extends AbstractSingleFieldCondition implements
         if ($this->userID !== null) {
             return ['userID' => $this->userID];
         }
+
+        return null;
     }
 
     /**
index 2b1c6a1963ddf89613c60980a76ac32dd9067838..aaa8552cde3e0b6b4ea9dc9abc1b45e694554c90 100644 (file)
@@ -51,6 +51,8 @@ class MultiPageCondition extends AbstractMultiSelectCondition implements IConten
                 $this->fieldName . '_reverseLogic' => $this->reverseLogic,
             ];
         }
+
+        return null;
     }
 
     /**
index f0417e7f9ae02e22e162f9f2e8a237d25eea43de..0490c3600a9256892eac568e632059d8a5569c00 100644 (file)
@@ -120,6 +120,8 @@ class UserLastActivityTimeIntervalDaysCondition extends AbstractSingleFieldCondi
         if (!empty($data)) {
             return $data;
         }
+
+        return null;
     }
 
     /**
index 35668c0620bb75c91a9ae0d10ab0e139c2833382..4a5f9326a496ffad3897d107acdd7de27eee75b3 100644 (file)
@@ -208,6 +208,8 @@ class PreparedStatement
         if ($row !== false) {
             return new $className(null, $row);
         }
+
+        return null;
     }
 
     /**
@@ -227,6 +229,8 @@ class PreparedStatement
         if ($row !== false) {
             return new $className(null, $row);
         }
+
+        return null;
     }
 
     /**
index 36166a641f036b773954957cd29b931c9d7060ee..01f535b16495b7c565fcad67a075bed9a7317ddc 100644 (file)
@@ -975,6 +975,8 @@ class DatabaseTableChangeProcessor
         } elseif (isset($this->tablePackageIDs[$table->getName()])) {
             return $this->tablePackageIDs[$table->getName()];
         }
+
+        return null;
     }
 
     /**
@@ -1008,6 +1010,8 @@ class DatabaseTableChangeProcessor
         } elseif (isset($this->tablePackageIDs[$table->getName()])) {
             return $this->tablePackageIDs[$table->getName()];
         }
+
+        return null;
     }
 
     /**
@@ -1026,6 +1030,8 @@ class DatabaseTableChangeProcessor
         } elseif (isset($this->tablePackageIDs[$table->getName()])) {
             return $this->tablePackageIDs[$table->getName()];
         }
+
+        return null;
     }
 
     /**
@@ -1305,5 +1311,7 @@ class DatabaseTableChangeProcessor
                 }
             }
         }
+
+        return null;
     }
 }
index 080d87cacb47f564fe19fe9f28c4a6d6d0ec9945..3e13daab801d2e33ef0d3aa4d83a26bb57201a15 100644 (file)
@@ -60,5 +60,6 @@ trait TDecimalsDatabaseTableColumn
      */
     public function getMaximumDecimals()
     {
+        return null;
     }
 }
index f41a82e908afc84d02c49a5428ab4a65af0d121f..34e305443c891df2e93c3643073f5743e970cda7 100644 (file)
@@ -27,6 +27,7 @@ trait TLengthDatabaseTableColumn
      */
     public function getMaximumLength()
     {
+        return null;
     }
 
     /**
@@ -37,6 +38,7 @@ trait TLengthDatabaseTableColumn
      */
     public function getMinimumLength()
     {
+        return null;
     }
 
     /**
index 646f29645982da5ef6ce1813f084f52e8a6d4a9a..f4b30c7dfe13ba52424b82accd59cabd76bda65a 100644 (file)
@@ -339,6 +339,8 @@ trait TXmlGuiPackageInstallationPlugin
                 return $element;
             }
         }
+
+        return null;
     }
 
     /**
index 5cb94690798d9f532438b32b3b82dff7fe6c0526..3851f2b2df92b89c17abcc86d46f04f1b5055f2e 100644 (file)
@@ -277,6 +277,8 @@ class UploadHandler extends SingletonFactory
                 return $file;
             }
         }
+
+        return null;
     }
 
     /**
index a1f2561af44c24542aa15a7269463878dc75e3a5..d77272a9ac81ab964693c6791e8838dacc36e780 100644 (file)
@@ -198,6 +198,8 @@ trait TFormParentNode
                 }
             }
         }
+
+        return null;
     }
 
     /**
index 24c0ff4d4653dd6604bb2bec4d5d853c25f76e88..43e5531b6e43d44c839d92bc3186c4ba74195226 100644 (file)
@@ -59,7 +59,7 @@ class LabelHandler extends SingletonFactory
      * no such option exists.
      *
      * @param string $optionName
-     * @return  int
+     * @return  int|null
      */
     public function getOptionID($optionName)
     {
@@ -68,6 +68,8 @@ class LabelHandler extends SingletonFactory
                 return $option->optionID;
             }
         }
+
+        return null;
     }
 
     /**
@@ -75,7 +77,7 @@ class LabelHandler extends SingletonFactory
      * object.
      *
      * @param string $objectType
-     * @return  \wcf\data\object\type\ObjectType
+     * @return  \wcf\data\object\type\ObjectType|null
      */
     public function getObjectType($objectType)
     {
@@ -84,6 +86,8 @@ class LabelHandler extends SingletonFactory
 
             return $this->cache['objectTypes'][$objectTypeID];
         }
+
+        return null;
     }
 
     /**
@@ -399,13 +403,15 @@ class LabelHandler extends SingletonFactory
      * Returns label group by id.
      *
      * @param int $groupID
-     * @return  ViewableLabelGroup
+     * @return  ViewableLabelGroup|null
      */
     public function getLabelGroup($groupID)
     {
         if (isset($this->labelGroups['groups'][$groupID])) {
             return $this->labelGroups['groups'][$groupID];
         }
+
+        return null;
     }
 
     /**
index a72654c11112d9bc3d9273f4cf124c936897f709..d45046780ba3194b322ec29622784444de106ad8 100644 (file)
@@ -108,6 +108,8 @@ class LanguageFactory extends SingletonFactory
         } elseif (isset($this->cache['codes'][$languageCode])) {
             return $this->getLanguage($this->cache['codes'][$languageCode]);
         }
+
+        return null;
     }
 
     /**
@@ -125,26 +127,30 @@ class LanguageFactory extends SingletonFactory
      * Returns the language category with the given name.
      *
      * @param string $categoryName
-     * @return  LanguageCategory
+     * @return  LanguageCategory|null
      */
     public function getCategory($categoryName)
     {
         if (isset($this->cache['categories'][$categoryName])) {
             return $this->cache['categories'][$categoryName];
         }
+
+        return null;
     }
 
     /**
      * Returns language category by id.
      *
      * @param int $languageCategoryID
-     * @return  LanguageCategory
+     * @return  LanguageCategory|null
      */
     public function getCategoryByID($languageCategoryID)
     {
         if (isset($this->cache['categoryIDs'][$languageCategoryID])) {
             return $this->cache['categories'][$this->cache['categoryIDs'][$languageCategoryID]];
         }
+
+        return null;
     }
 
     /**
index dea45efc68a04e8a2e71faf71ed8c0fbe642685c..a173cbf3bed66deac767c94b2761921c54b67038 100644 (file)
@@ -40,7 +40,7 @@ class ModificationLogHandler extends SingletonFactory
      * Returns object type by object type name.
      *
      * @param string $objectType
-     * @return  ObjectType
+     * @return  ObjectType|null
      */
     public function getObjectType($objectType)
     {
@@ -49,6 +49,8 @@ class ModificationLogHandler extends SingletonFactory
                 return $objectTypeObj;
             }
         }
+
+        return null;
     }
 
     /**
index 9fd0c9c114ab2e5abcb1c918a302b9013661591e..175f75e2a77d9f0dbcecee7c27b9012eb482c092 100644 (file)
@@ -211,13 +211,15 @@ abstract class TreeMenu extends SingletonFactory
      * Returns the active menu item.
      *
      * @param int $level
-     * @return  string
+     * @return  string|null
      */
     public function getActiveMenuItem($level = 0)
     {
         if ($level < \count($this->activeMenuItems)) {
             return $this->activeMenuItems[\count($this->activeMenuItems) - ($level + 1)];
         }
+
+        return null;
     }
 
     /**
index d6b0851638d583dbfe123b3b60e60bd14d7386ac..cef1acb074ae7fea06a3d10bbdf71ca631fbbc18 100644 (file)
@@ -140,7 +140,7 @@ class UserProfileMenu extends SingletonFactory
      * Returns a specific menu item.
      *
      * @param string $menuItem
-     * @return  UserProfileMenuItem
+     * @return  UserProfileMenuItem|null
      */
     public function getMenuItem($menuItem)
     {
@@ -149,5 +149,7 @@ class UserProfileMenu extends SingletonFactory
                 return $item;
             }
         }
+
+        return null;
     }
 }
index d4e04b597ebca7ec21b6ed16923991e446e798d0..1319449ab354c4d3e49e74e53a8706ec759ad116 100644 (file)
@@ -378,7 +378,7 @@ class MessageEmbeddedObjectManager extends SingletonFactory
      *
      * @param string $embeddedObjectType
      * @param int $objectID
-     * @return  \wcf\data\DatabaseObject
+     * @return  \wcf\data\DatabaseObject|null
      */
     public function getObject($embeddedObjectType, $objectID)
     {
@@ -393,6 +393,8 @@ class MessageEmbeddedObjectManager extends SingletonFactory
                 }
             }
         }
+
+        return null;
     }
 
     /**
index 83367d5b50c445329c44f73e63d6a45c19a49168..b1523403dcc15555d838e17b90c2197a7f5c772a 100644 (file)
@@ -385,7 +385,7 @@ class MessageQuoteManager extends SingletonFactory
      *
      * @param string $quoteID
      * @param bool $useFullQuote
-     * @return  string
+     * @return  string|null
      */
     public function getQuote($quoteID, $useFullQuote = true)
     {
@@ -394,13 +394,15 @@ class MessageQuoteManager extends SingletonFactory
         } elseif (isset($this->quoteData[$quoteID])) {
             return $this->quoteData[$quoteID];
         }
+
+        return null;
     }
 
     /**
      * Returns the object id by quote id.
      *
      * @param string $quoteID
-     * @return  int
+     * @return  int|null
      */
     public function getObjectID($quoteID)
     {
@@ -413,6 +415,8 @@ class MessageQuoteManager extends SingletonFactory
                 }
             }
         }
+
+        return null;
     }
 
     /**
index a969c69ada19f0f13425628236dcae821a190c42..21e56477ced703b07c0aed842297a4c9f80919f1 100644 (file)
@@ -130,13 +130,15 @@ class QuotedMessage implements \Countable, \Iterator
      * Returns the full quote by quote id.
      *
      * @param string $quoteID
-     * @return  string
+     * @return  string|null
      */
     public function getFullQuote($quoteID)
     {
         if (isset($this->fullQuotes[$quoteID])) {
             return $this->fullQuotes[$quoteID];
         }
+
+        return null;
     }
 
     /**
index 0c0e63402782d9b396a30d23b40955dde266ca2d..5432f9f558ac5e5df3fb273bd33d0d3519d0799f 100644 (file)
@@ -101,7 +101,7 @@ class ModerationQueueManager extends SingletonFactory
      * @param string $definitionName
      * @param string $objectType
      * @param int $objectTypeID
-     * @return  object
+     * @return  object|null
      */
     public function getProcessor($definitionName, $objectType, $objectTypeID = null)
     {
@@ -112,6 +112,8 @@ class ModerationQueueManager extends SingletonFactory
         if ($objectTypeID !== null && isset($this->objectTypes[$objectTypeID])) {
             return $this->objectTypes[$objectTypeID]->getProcessor();
         }
+
+        return null;
     }
 
     /**
@@ -137,13 +139,15 @@ class ModerationQueueManager extends SingletonFactory
      *
      * @param string $definitionName
      * @param string $objectType
-     * @return  int
+     * @return  int|null
      */
     public function getObjectTypeID($definitionName, $objectType)
     {
         if ($this->isValid($definitionName, $objectType)) {
             return $this->objectTypeNames[$definitionName][$objectType];
         }
+
+        return null;
     }
 
     /**
index fe0ba8d3d9b7bdc92d9b10abc47eef278a0bcfa6..c4ddff200a5b0799abf3e47146b3531033f29bcd 100644 (file)
@@ -71,6 +71,8 @@ class ArticleModerationQueueReportHandler extends AbstractModerationQueueHandler
         if ($this->isValid($objectID)) {
             return $this->getArticle($objectID);
         }
+
+        return null;
     }
 
     /**
index 649b95217c1cc92a9baa9dde011e754dc089375f..a8fac080dc18dc35f74598b95c06a0ca1f69856a 100644 (file)
@@ -96,6 +96,8 @@ class UserModerationQueueReportHandler extends AbstractModerationQueueHandler im
         if ($this->isValid($objectID)) {
             return $this->getUser($objectID);
         }
+
+        return null;
     }
 
     /**
index 234a33db1fa325b86bfba778cc6c186e27abba66..36c865c853868a8819d78d38656fd7a269e92d88 100644 (file)
@@ -592,26 +592,30 @@ class PackageArchive
      * Returns information about the author of this package archive.
      *
      * @param string $name name of the requested information
-     * @return  string
+     * @return  string|null
      */
     public function getAuthorInfo($name)
     {
         if (isset($this->authorInfo[$name])) {
             return $this->authorInfo[$name];
         }
+
+        return null;
     }
 
     /**
      * Returns information about this package.
      *
      * @param string $name name of the requested information
-     * @return  mixed
+     * @return  mixed|null
      */
     public function getPackageInfo($name)
     {
         if (isset($this->packageInfo[$name])) {
             return $this->packageInfo[$name];
         }
+
+        return null;
     }
 
     /**
@@ -986,6 +990,8 @@ class PackageArchive
         if (isset($this->instructions[$type])) {
             return $this->instructions[$type];
         }
+
+        return null;
     }
 
     /**
index adf3dff66ae0abdc592fe21936cc2ba1a007d414..b20d9f535eee41e94630348decd8604ff3eb4961 100644 (file)
@@ -150,5 +150,7 @@ abstract class PackageInstallationFormManager
         if ($row) {
             return \unserialize(\base64_decode($row['document']));
         }
+
+        return null;
     }
 }
index 6aa2826ad6cfcf581de005c4fdaf9e679672c04d..50e9580e3ac137a5e14045756edee5e6a0b21d49 100644 (file)
@@ -958,6 +958,7 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
      */
     protected function getSortOptionHandler()
     {
+        return null;
     }
 
     /**
index e152dccbaf0d6b1c21d1d436dd94491835abd88c..ad8d5464b82e468fd13bab5ddac7215c32ec98dc 100644 (file)
@@ -113,6 +113,7 @@ abstract class AbstractPackageInstallationPlugin implements IPackageInstallation
      */
     public static function getDefaultFilename()
     {
+        return null;
     }
 
     /**
index 8605bad83b0e64c8397450eef7cc36966c64fda0..4321bdc0c60235af14fa2c609ae61119d4ed5549 100644 (file)
@@ -126,13 +126,15 @@ class PackageValidationManager extends SingletonFactory
      * Returns the version number of a virtual package or null if it doesn't exist.
      *
      * @param string $package
-     * @return  string
+     * @return  string|null
      */
     public function getVirtualPackage($package)
     {
         if (isset($this->virtualPackageList[$package])) {
             return $this->virtualPackageList[$package];
         }
+
+        return null;
     }
 
     /**
@@ -167,7 +169,7 @@ class PackageValidationManager extends SingletonFactory
     /**
      * Recursively traverses the package validation archives and returns the first exception.
      *
-     * @return  \Exception
+     * @return  \Exception|null
      */
     public function getException()
     {
@@ -176,6 +178,8 @@ class PackageValidationManager extends SingletonFactory
                 return $packageArchive->getException();
             }
         }
+
+        return null;
     }
 
     /**
@@ -210,5 +214,7 @@ class PackageValidationManager extends SingletonFactory
         if (isset($this->packageInstallationPlugins[$pip])) {
             return \call_user_func([$this->packageInstallationPlugins[$pip], 'getDefaultFilename']);
         }
+
+        return null;
     }
 }
index fa3de5c3d417d3b14f9916017dd330ae9d391215..cb6ce7d9708ab7fef7fa06acadfd633812cec616 100644 (file)
@@ -448,13 +448,15 @@ class PollManager extends SingletonFactory
      * Returns related object for given poll object.
      *
      * @param Poll $poll
-     * @return  \wcf\data\IPollObject
+     * @return  \wcf\data\IPollObject|null
      */
     public function getRelatedObject(Poll $poll)
     {
         if ($poll->objectID) {
             return $this->getHandler($poll->objectTypeID)->getRelatedObject($poll);
         }
+
+        return null;
     }
 
     /**
index 18959729d4941d3dd95feefb71f3188f14c59a62..8154770f025276fb60bf31d5e9a56b38f4113b47 100644 (file)
@@ -218,6 +218,8 @@ class ReactionHandler extends SingletonFactory
         if (isset($this->cache[$objectName])) {
             return $this->cache[$objectName];
         }
+
+        return null;
     }
 
     /**
@@ -857,6 +859,8 @@ class ReactionHandler extends SingletonFactory
                 }
             }
         }
+
+        return null;
     }
 
     /**
index 60d807ce46526b540e238a809152a8df2ef6ae7a..e2a041a70424129d45ff6f29a62460aeb2afa1b3 100644 (file)
@@ -91,6 +91,8 @@ class RegistryHandler extends SingletonFactory
         if (isset($this->cache[$packageID][$field])) {
             return $this->cache[$packageID][$field];
         }
+
+        return null;
     }
 
     /**
index d1718aef50717463ca1d5186affb9c8a6caec820..8c87c36cc3f202a6561da09fedf9533c3b33f7b3 100644 (file)
@@ -248,6 +248,8 @@ class ControllerMap extends SingletonFactory
                 ];
             }
         }
+
+        return null;
     }
 
     /**
@@ -418,6 +420,8 @@ class ControllerMap extends SingletonFactory
                 ];
             }
         }
+
+        return null;
     }
 
     /**
index 1f53b89ed0e55f01adfc1ddf08db6720fd1e5583..d383a9d597138746f7e8e2b2808001b94460eab4 100644 (file)
@@ -38,6 +38,7 @@ abstract class AbstractSearchableObjectType extends AbstractObjectTypeProcessor
      */
     public function getConditions(?IForm $form = null)
     {
+        return null;
     }
 
     /**
index f3899dd120b3e06a15ce727d9aed3eaad7341b2a..5788b29b94cca254ec6d713c66ae175daa2a5910 100644 (file)
@@ -59,6 +59,8 @@ class ArticleSearch extends AbstractSearchableObjectType
         if (isset($this->messageCache[$objectID])) {
             return $this->messageCache[$objectID];
         }
+
+        return null;
     }
 
     /**
index 2558f6e19cb5bd680511f6aba33420e87a6a3e9e..1dcd4b2fc2d0fcec78d4e8eb4fcd97d6c24ef19c 100644 (file)
@@ -47,6 +47,8 @@ class PageSearch extends AbstractSearchableObjectType
         if (isset($this->messageCache[$objectID])) {
             return $this->messageCache[$objectID];
         }
+
+        return null;
     }
 
     /**
index 13868679073b72faf67b691d6b7fb9d8e9cae3d0..85f990fcd04df49aaae5a136c1da778137e699f2 100644 (file)
@@ -72,6 +72,8 @@ class SearchEngine extends SingletonFactory implements ISearchEngine
         if (isset($this->availableObjectTypes[$objectTypeName])) {
             return $this->availableObjectTypes[$objectTypeName];
         }
+
+        return null;
     }
 
     /**
index e4089f218d312e2f665841ffa19d0ab40840bcf0..ed9b3f7a7efe55e6086546f0e8f5a29fb4aa2398 100755 (executable)
@@ -38,6 +38,7 @@ abstract class AbstractSitemapObjectObjectType implements ISitemapObjectObjectTy
      */
     public function getLastModifiedColumn()
     {
+        return null;
     }
 
     /**
index af106f3132e7ee4658a6893d0f70f1b85f9e43fe..979df096e15fde4cce92e4c59fe1d0b83c481e44 100644 (file)
@@ -198,6 +198,8 @@ final class StyleCompiler extends SingletonFactory
         } catch (\Exception $e) {
             return $e;
         }
+
+        return null;
     }
 
     /**
index e3a5c24be8920667a9c9a0268393044140d5220c..4358b34039ffafff67ea893b1ed7b96ed5846c8c 100644 (file)
@@ -243,6 +243,8 @@ class StyleHandler extends SingletonFactory
                 }
             }
         }
+
+        return null;
     }
 
     /**
@@ -292,6 +294,8 @@ class StyleHandler extends SingletonFactory
         if ($styleID) {
             return $this->cache['styles'][$styleID];
         }
+
+        return null;
     }
 
     /**
index e3141f4f25ab3087ea96b611d632a1cb3c8c80c0..9d2087a15d084b99eb0d4528f9ab69cb803edc1a 100644 (file)
@@ -28,5 +28,6 @@ abstract class AbstractCombinedTaggable extends AbstractTaggable implements ICom
      */
     public function getObjectListFor(array $tags)
     {
+        return null;
     }
 }
index 5f353cf0b44fa664e631e73df388d529355400ea..ac49f09c0e41a67a20245c2547683f447760b8bb 100644 (file)
@@ -224,6 +224,8 @@ class UploadFile
                 'mimeType' => $imageData['mime'],
             ];
         }
+
+        return null;
     }
 
     /**
index 4657c021b473ee0fe37163a2fead3427c46f5602..66c8fa57a34afc17363128314302b265bd2231b2 100644 (file)
@@ -139,13 +139,15 @@ class UploadHandler
      * for the identifier.
      *
      * @param string $identifier
-     * @return  UploadHandler
+     * @return  UploadHandler|null
      */
     public static function getUploadHandler($identifier)
     {
         if (isset($_FILES[$identifier]) && \is_array($_FILES[$identifier])) {
             return new self($_FILES[$identifier]);
         }
+
+        return null;
     }
 
     /**
index d71ea66d04fb5bea870e0a0c481bd9a3856ce406..079592654e54698c9ee1b8b4a08679ea26cfcc71 100644 (file)
@@ -44,26 +44,30 @@ class UserActivityEventHandler extends SingletonFactory
      * Returns an object type by id.
      *
      * @param int $objectTypeID
-     * @return  ObjectType
+     * @return  ObjectType|null
      */
     public function getObjectType($objectTypeID)
     {
         if (isset($this->objectTypes['objects'][$objectTypeID])) {
             return $this->objectTypes['objects'][$objectTypeID];
         }
+
+        return null;
     }
 
     /**
      * Returns an object type id by object type name.
      *
      * @param string $objectType
-     * @return  int
+     * @return  int|null
      */
     public function getObjectTypeID($objectType)
     {
         if (isset($this->objectTypes['names'][$objectType])) {
             return $this->objectTypes['names'][$objectType];
         }
+
+        return null;
     }
 
     /**
index 298f359c9f3acd38059b8435c2e141420f8b7c4f..04c60b9f2a19b40f858d5d9da8e7b14e8112c393 100644 (file)
@@ -251,13 +251,15 @@ class UserActivityPointHandler extends SingletonFactory
      * null if no such object type exists.
      *
      * @param int $objectTypeID
-     * @return  ObjectType
+     * @return  ObjectType|null
      */
     public function getObjectType($objectTypeID)
     {
         if (isset($this->objectTypeNames[$objectTypeID])) {
             return $this->getObjectTypeByName($this->objectTypeNames[$objectTypeID]);
         }
+
+        return null;
     }
 
     /**
@@ -265,13 +267,15 @@ class UserActivityPointHandler extends SingletonFactory
      * or null if no such object type exists.
      *
      * @param string $objectType
-     * @return  ObjectType
+     * @return  ObjectType|null
      */
     public function getObjectTypeByName($objectType)
     {
         if (isset($this->objectTypes[$objectType])) {
             return $this->objectTypes[$objectType];
         }
+
+        return null;
     }
 
     /**
index 70143ccab54568ea22d1012718a18ddf5809af2c..051aac39c18b1be4b311b78145c72e56513ffa81 100644 (file)
@@ -71,13 +71,15 @@ class UserCollapsibleContentHandler extends SingletonFactory
      * null, if object type is unknown.
      *
      * @param string $objectType
-     * @return  int
+     * @return  int|null
      */
     public function getObjectTypeID($objectType)
     {
         if (isset($this->cache['objectTypeIDs'][$objectType])) {
             return $this->cache['objectTypeIDs'][$objectType];
         }
+
+        return null;
     }
 
     /**
index fbdecf2ffa62d0ee51df1c7cb25e704842cb86a2..9d36c6e0e5e4a320dad17b6b3b24d233c1dc8aff 100644 (file)
@@ -706,6 +706,8 @@ class UserNotificationHandler extends SingletonFactory
         if (isset($this->availableObjectTypes[$objectType])) {
             return $this->availableObjectTypes[$objectType];
         }
+
+        return null;
     }
 
     /**
index 474c7d7e3e1554123f503e771eb4783e3a7a6e9a..a5db7b3bbaaef92d2748c25ab84bea2c490ef9eb 100644 (file)
@@ -30,6 +30,7 @@ class PaidSubscriptionUserUserNotificationObject extends DatabaseObjectDecorator
      */
     public function getAuthorID()
     {
+        return null;
     }
 
     /**
index c436edec78d01074b7828047b3c40e6767a6476f..13f2fa88041b0d85c8373c08e81da6fbd017119a 100644 (file)
@@ -102,6 +102,8 @@ final class DOMUtil
                 return $parent;
             }
         }
+
+        return null;
     }
 
     /**