'no_useless_return' => true,
'return_assignment' => true,
- 'simplified_null_return' => true,
'multiline_whitespace_before_semicolons' => true,
'no_empty_statement' => true,
if (isset($this->i18nValues[$fieldName])) {
return $this->i18nValues[$fieldName];
}
+
+ return null;
}
/**
return $this->articleContents[0];
}
}
+
+ return null;
}
/**
*/
public function getLanguageID()
{
+ return null;
}
/**
if ($this->getArticleContent() !== null) {
return $this->getArticleContent()->getImage();
}
+
+ return null;
}
/**
if ($this->getArticleContent() !== null) {
return $this->getArticleContent()->getTeaserImage();
}
+
+ return null;
}
/**
if ($this->languageID) {
return LanguageFactory::getInstance()->getLanguage($this->languageID);
}
+
+ return null;
}
/**
if (($row = $statement->fetchSingleRow()) !== false) {
return new self(null, $row);
}
+
+ return null;
}
}
if (isset($this->cachedBBCodes[$tag])) {
return $this->cachedBBCodes[$tag];
}
+
+ return null;
}
/**
) {
\wcf\functions\exception\logThrowable($e);
- return;
+ return null;
}
throw $e;
}
}
}
+
+ return null;
}
}
if (($row = $statement->fetchSingleRow()) !== false) {
return new self(null, $row);
}
+
+ return null;
}
/**
if ($category) {
return new static($category);
}
+
+ return null;
}
}
if (isset($this->labels[$labelID])) {
return $this->labels[$labelID];
}
+
+ return null;
}
/**
*/
public function getLanguageID()
{
+ return null;
}
}
if (isset($this->cachedMenus[$menuID])) {
return $this->cachedMenus[$menuID];
}
+
+ return null;
}
/**
if (isset($this->cachedMenuItems[$menuID])) {
return $this->cachedMenuItems[$menuID];
}
+
+ return null;
}
/**
if ($this->assignedUserID) {
return UserProfileRuntimeCache::getInstance()->getObject($this->assignedUserID);
}
+
+ return null;
}
/**
* 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;
}
/**
* 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;
}
/**
* category name is invalid.
*
* @param string $categoryName
- * @return ObjectTypeDefinition[]
+ * @return ObjectTypeDefinition[]|null
*/
public function getDefinitionsByCategory($categoryName)
{
return $definitions;
}
+
+ return null;
}
/**
* exists.
*
* @param int $objectTypeID
- * @return ObjectType
+ * @return ObjectType|null
*/
public function getObjectType($objectTypeID)
{
if (isset($this->objectTypes[$objectTypeID])) {
return $this->objectTypes[$objectTypeID];
}
+
+ return null;
}
/**
*
* @param string $definitionName
* @param string $objectTypeName
- * @return ObjectType
+ * @return ObjectType|null
*/
public function getObjectTypeByName($definitionName, $objectTypeName)
{
) {
return $this->groupedObjectTypes[$definitionName][$objectTypeName];
}
+
+ return null;
}
/**
*
* @param string $definitionName
* @param string $objectTypeName
- * @return int
+ * @return int|null
*/
public function getObjectTypeIDByName($definitionName, $objectTypeName)
{
if ($objectType !== null) {
return $objectType->objectTypeID;
}
+
+ return null;
}
/**
* 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;
}
/**
if ($row !== false) {
return new PageContent(null, $row);
}
+
+ return null;
}
/**
if (isset($this->cache['pages'][$pageID])) {
return $this->cache['pages'][$pageID];
}
+
+ return null;
}
/**
if (isset($this->cache['controller'][$controller])) {
return $this->getPage($this->cache['controller'][$controller]);
}
+
+ return null;
}
/**
if (isset($this->cache['identifier'][$identifier])) {
return $this->getPage($this->cache['identifier'][$identifier]);
}
+
+ return null;
}
/**
if (($row = $statement->fetchSingleRow()) !== false) {
return new self(null, $row);
}
+
+ return null;
}
/**
*/
public function getUserProfile()
{
+ return null;
}
/**
if ($row !== false) {
return new self(null, $row);
}
+
+ return null;
}
}
if ($row !== false) {
return new self(null, $row);
}
+
+ return null;
}
}
* 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;
}
/**
if (isset($this->cachedSmileyByCode[$code])) {
return $this->cachedSmileyByCode[$code];
}
+
+ return null;
}
/**
*
* @param string $variableName
* @param bool $toHex
- * @return string
+ * @return string|null
*/
public function getVariable($variableName, $toHex = false)
{
return $this->variables[$variableName];
}
+
+ return null;
}
/**
* 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;
}
/**
if (isset($this->categories[$categoryID])) {
return $this->categories[$categoryID];
}
+
+ return null;
}
/**
if (isset(self::$cache['groups'][$groupID])) {
return self::$cache['groups'][$groupID];
}
+
+ return null;
}
/**
* @param int $packageID
* @param int $eventID
* @param int $objectID
- * @return UserNotification
+ * @return UserNotification|null
*/
public static function getNotification($packageID, $eventID, $objectID)
{
if ($row !== false) {
return new self(null, $row);
}
+
+ return null;
}
}
if ($row = $statement->fetchArray()) {
return new self(null, $row);
}
+
+ return null;
}
}
if (isset(self::$applicationObjects[$application->packageID])) {
return self::$applicationObjects[$application->packageID];
}
+
+ return null;
}
/**
* 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;
}
/**
if (isset($this->categories[$objectTypeID][$categoryName])) {
return $this->categories[$objectTypeID][$categoryName];
}
+
+ return null;
}
/**
return $this->cache['application'][$packageID];
}
}
+
+ return null;
}
/**
if (isset($this->cache['application'][$packageID])) {
return $this->cache['application'][$packageID];
}
+
+ return null;
}
/**
return $abbreviation;
}
}
+
+ return null;
}
/**
if (isset($this->cachedObjects[$objectID])) {
return $this->cachedObjects[$objectID];
}
+
+ return null;
}
/**
*/
public function getImage()
{
+ return null;
}
/**
*/
public function getTitle()
{
+ return null;
}
/**
if (isset($this->boxes[$boxID])) {
return $this->boxes[$boxID];
}
+
+ return null;
}
/**
if (isset($this->boxesByIdentifier[$identifier])) {
return $this->boxesByIdentifier[$identifier];
}
+
+ return null;
}
/**
*/
protected function getObjectList()
{
+ return null;
}
/**
*/
protected function getObjectList()
{
+ return null;
}
/**
if (isset($this->objectTypes[$objectTypeID])) {
return $this->objectTypes[$objectTypeID];
}
+
+ return null;
}
/**
if (isset($this->objectTypes[$definitionName])) {
return $this->objectTypes[$definitionName];
}
+
+ return null;
}
/**
if (isset($this->categories[$categoryID])) {
return $this->categories[$categoryID];
}
+
+ return null;
}
/**
if (isset($this->objectTypeIDs[$objectTypeID])) {
return $this->getObjectTypeByName($this->objectTypeIDs[$objectTypeID]);
}
+
+ return null;
}
/**
if (isset($this->objectTypes[$objectType])) {
return $this->objectTypes[$objectType];
}
+
+ return null;
}
/**
if (isset($this->cache['objectTypeNames'][$typeName])) {
return $this->cache['objectTypeNames'][$typeName];
}
+
+ return null;
}
/**
if (isset($this->cache['objectTypes'][$objectTypeID])) {
return $this->cache['objectTypes'][$objectTypeID];
}
+
+ return null;
}
/**
return $objectTypeID;
}
}
+
+ return null;
}
/**
if (isset($this->cache['objectTypeIDs'][$objectType])) {
return $this->cache['objectTypeIDs'][$objectType];
}
+
+ return null;
}
/**
if (isset($this->cache['objectTypes'][$objectTypeID])) {
return $this->cache['objectTypes'][$objectTypeID];
}
+
+ return null;
}
/**
if ($this->fieldValue) {
return [$this->fieldName => $this->fieldValue];
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
if ($this->maxValue !== null) {
return $this->maxValue;
}
+
+ return null;
}
/**
if ($this->minValue !== null) {
return $this->minValue;
}
+
+ return null;
}
/**
if (!empty($this->fieldValue)) {
return [$this->fieldName => $this->fieldValue];
}
+
+ return null;
}
/**
if ($this->fieldValue != self::NO_SELECTION_VALUE) {
return [$this->fieldName => $this->fieldValue];
}
+
+ return null;
}
/**
if (\mb_strlen($this->fieldValue)) {
return [$this->fieldName => $this->fieldValue];
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
if ($this->birthdayToday) {
return ['birthdayToday' => 1];
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
'languageIDs' => $this->languageIDs,
];
}
+
+ return null;
}
/**
'usesMobileBrowser' => $this->usesMobileBrowser,
];
}
+
+ return null;
}
/**
'multifactorActive' => $this->multifactorActive,
];
}
+
+ return null;
}
/**
'optionValues' => $data,
];
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
if ($this->userID !== null) {
return ['userID' => $this->userID];
}
+
+ return null;
}
/**
$this->fieldName . '_reverseLogic' => $this->reverseLogic,
];
}
+
+ return null;
}
/**
if (!empty($data)) {
return $data;
}
+
+ return null;
}
/**
if ($row !== false) {
return new $className(null, $row);
}
+
+ return null;
}
/**
if ($row !== false) {
return new $className(null, $row);
}
+
+ return null;
}
/**
} elseif (isset($this->tablePackageIDs[$table->getName()])) {
return $this->tablePackageIDs[$table->getName()];
}
+
+ return null;
}
/**
} elseif (isset($this->tablePackageIDs[$table->getName()])) {
return $this->tablePackageIDs[$table->getName()];
}
+
+ return null;
}
/**
} elseif (isset($this->tablePackageIDs[$table->getName()])) {
return $this->tablePackageIDs[$table->getName()];
}
+
+ return null;
}
/**
}
}
}
+
+ return null;
}
}
*/
public function getMaximumDecimals()
{
+ return null;
}
}
*/
public function getMaximumLength()
{
+ return null;
}
/**
*/
public function getMinimumLength()
{
+ return null;
}
/**
return $element;
}
}
+
+ return null;
}
/**
return $file;
}
}
+
+ return null;
}
/**
}
}
}
+
+ return null;
}
/**
* no such option exists.
*
* @param string $optionName
- * @return int
+ * @return int|null
*/
public function getOptionID($optionName)
{
return $option->optionID;
}
}
+
+ return null;
}
/**
* object.
*
* @param string $objectType
- * @return \wcf\data\object\type\ObjectType
+ * @return \wcf\data\object\type\ObjectType|null
*/
public function getObjectType($objectType)
{
return $this->cache['objectTypes'][$objectTypeID];
}
+
+ return null;
}
/**
* 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;
}
/**
} elseif (isset($this->cache['codes'][$languageCode])) {
return $this->getLanguage($this->cache['codes'][$languageCode]);
}
+
+ return null;
}
/**
* 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;
}
/**
* Returns object type by object type name.
*
* @param string $objectType
- * @return ObjectType
+ * @return ObjectType|null
*/
public function getObjectType($objectType)
{
return $objectTypeObj;
}
}
+
+ return null;
}
/**
* 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;
}
/**
* Returns a specific menu item.
*
* @param string $menuItem
- * @return UserProfileMenuItem
+ * @return UserProfileMenuItem|null
*/
public function getMenuItem($menuItem)
{
return $item;
}
}
+
+ return null;
}
}
*
* @param string $embeddedObjectType
* @param int $objectID
- * @return \wcf\data\DatabaseObject
+ * @return \wcf\data\DatabaseObject|null
*/
public function getObject($embeddedObjectType, $objectID)
{
}
}
}
+
+ return null;
}
/**
*
* @param string $quoteID
* @param bool $useFullQuote
- * @return string
+ * @return string|null
*/
public function getQuote($quoteID, $useFullQuote = true)
{
} 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)
{
}
}
}
+
+ return null;
}
/**
* 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;
}
/**
* @param string $definitionName
* @param string $objectType
* @param int $objectTypeID
- * @return object
+ * @return object|null
*/
public function getProcessor($definitionName, $objectType, $objectTypeID = null)
{
if ($objectTypeID !== null && isset($this->objectTypes[$objectTypeID])) {
return $this->objectTypes[$objectTypeID]->getProcessor();
}
+
+ return null;
}
/**
*
* @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;
}
/**
if ($this->isValid($objectID)) {
return $this->getArticle($objectID);
}
+
+ return null;
}
/**
if ($this->isValid($objectID)) {
return $this->getUser($objectID);
}
+
+ return null;
}
/**
* 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;
}
/**
if (isset($this->instructions[$type])) {
return $this->instructions[$type];
}
+
+ return null;
}
/**
if ($row) {
return \unserialize(\base64_decode($row['document']));
}
+
+ return null;
}
}
*/
protected function getSortOptionHandler()
{
+ return null;
}
/**
*/
public static function getDefaultFilename()
{
+ return null;
}
/**
* 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;
}
/**
/**
* Recursively traverses the package validation archives and returns the first exception.
*
- * @return \Exception
+ * @return \Exception|null
*/
public function getException()
{
return $packageArchive->getException();
}
}
+
+ return null;
}
/**
if (isset($this->packageInstallationPlugins[$pip])) {
return \call_user_func([$this->packageInstallationPlugins[$pip], 'getDefaultFilename']);
}
+
+ return null;
}
}
* 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;
}
/**
if (isset($this->cache[$objectName])) {
return $this->cache[$objectName];
}
+
+ return null;
}
/**
}
}
}
+
+ return null;
}
/**
if (isset($this->cache[$packageID][$field])) {
return $this->cache[$packageID][$field];
}
+
+ return null;
}
/**
];
}
}
+
+ return null;
}
/**
];
}
}
+
+ return null;
}
/**
*/
public function getConditions(?IForm $form = null)
{
+ return null;
}
/**
if (isset($this->messageCache[$objectID])) {
return $this->messageCache[$objectID];
}
+
+ return null;
}
/**
if (isset($this->messageCache[$objectID])) {
return $this->messageCache[$objectID];
}
+
+ return null;
}
/**
if (isset($this->availableObjectTypes[$objectTypeName])) {
return $this->availableObjectTypes[$objectTypeName];
}
+
+ return null;
}
/**
*/
public function getLastModifiedColumn()
{
+ return null;
}
/**
} catch (\Exception $e) {
return $e;
}
+
+ return null;
}
/**
}
}
}
+
+ return null;
}
/**
if ($styleID) {
return $this->cache['styles'][$styleID];
}
+
+ return null;
}
/**
*/
public function getObjectListFor(array $tags)
{
+ return null;
}
}
'mimeType' => $imageData['mime'],
];
}
+
+ return null;
}
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
if (isset($this->availableObjectTypes[$objectType])) {
return $this->availableObjectTypes[$objectType];
}
+
+ return null;
}
/**
*/
public function getAuthorID()
{
+ return null;
}
/**
return $parent;
}
}
+
+ return null;
}
/**