From: Matthias Schmidt Date: Wed, 6 Apr 2016 14:19:09 +0000 (+0200) Subject: Add missing/Fix return tags X-Git-Tag: 3.0.0_Beta_1~1967^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=71952a876ad526faa88bc73c36825c26a06e7439;p=GitHub%2FWoltLab%2FWCF.git Add missing/Fix return tags --- diff --git a/wcfsetup/install.php b/wcfsetup/install.php index c76427517e..292fa30e3d 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -711,6 +711,7 @@ class File { * * @param string $function * @param array $arguments + * @return mixed */ public function __call($function, $arguments) { if (function_exists('f' . $function)) { @@ -766,6 +767,7 @@ class ZipFile extends File { * * @param string $function * @param array $arguments + * @return mixed */ public function __call($function, $arguments) { if (self::$gzopen64 && function_exists('gz' . $function . '64')) { diff --git a/wcfsetup/install/files/lib/system/Regex.class.php b/wcfsetup/install/files/lib/system/Regex.class.php index 017960bf79..c85485891f 100644 --- a/wcfsetup/install/files/lib/system/Regex.class.php +++ b/wcfsetup/install/files/lib/system/Regex.class.php @@ -245,6 +245,7 @@ final class Regex { * * @param mixed $result * @param string $method + * @return mixed */ private function checkResult($result, $method = '') { if ($result === false || $result === null) { diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index c28cac1581..ae49c3a64e 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -696,6 +696,7 @@ class WCF { * * @param string $name * @param array $arguments + * @return object */ public static final function __callStatic($name, array $arguments) { $className = preg_replace('~^get~', '', $name); diff --git a/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php index ef5872823c..eee48377e4 100644 --- a/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php @@ -249,7 +249,8 @@ class CodeBBCode extends AbstractBBCode { /** * Fixes markup that every line has proper number of opening and closing tags * - * @param array $lines + * @param string[] $lines + * @return string[] */ public static function fixMarkup(array $lines) { static $spanRegex = null; diff --git a/wcfsetup/install/files/lib/system/bulk/processing/user/AbstractUserBulkProcessingAction.class.php b/wcfsetup/install/files/lib/system/bulk/processing/user/AbstractUserBulkProcessingAction.class.php index 5b0a73e720..2c0aa34c20 100644 --- a/wcfsetup/install/files/lib/system/bulk/processing/user/AbstractUserBulkProcessingAction.class.php +++ b/wcfsetup/install/files/lib/system/bulk/processing/user/AbstractUserBulkProcessingAction.class.php @@ -1,6 +1,7 @@ * @package com.woltlab.wcf * @subpackage system.bulk.processing.user @@ -19,7 +20,7 @@ use wcf\system\WCF; */ abstract class AbstractUserBulkProcessingAction extends AbstractBulkProcessingAction { /** - * @see \wcf\system\bulk\processing\IBulkProcessingAction::getObjectList() + * @inheritDoc */ public function getObjectList() { return new UserList(); @@ -29,7 +30,8 @@ abstract class AbstractUserBulkProcessingAction extends AbstractBulkProcessingAc * Returns all users who the active user can access due to their user group * assocition. * - * @param \wcf\data\user\UserList $userList + * @param UserList $userList + * @return User[] */ protected function getAccessibleUsers(UserList $userList) { // fetch user group ids of all users @@ -42,16 +44,16 @@ abstract class AbstractUserBulkProcessingAction extends AbstractBulkProcessingAc $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($conditionBuilder->getParameters()); - $groupIDs = [ ]; + $groupIDs = []; while ($row = $statement->fetchArray()) { if (!isset($groupIDs[$row['userID']])) { - $groupIDs[$row['userID']] = [ ]; + $groupIDs[$row['userID']] = []; } $groupIDs[$row['userID']][] = $row['groupID']; } - $users = [ ]; + $users = []; foreach ($userList as $user) { if (empty($groupIDs[$user->userID]) || UserGroup::isAccessibleGroup($groupIDs[$user->userID])) { $users[$user->userID] = $user; diff --git a/wcfsetup/install/files/lib/system/category/CategoryPermissionHandler.class.php b/wcfsetup/install/files/lib/system/category/CategoryPermissionHandler.class.php index 36ebfdf85b..c2c86ba658 100644 --- a/wcfsetup/install/files/lib/system/category/CategoryPermissionHandler.class.php +++ b/wcfsetup/install/files/lib/system/category/CategoryPermissionHandler.class.php @@ -10,7 +10,7 @@ use wcf\system\WCF; * Handles the category permissions. * * @author Matthias Schmidt - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf * @subpackage system.category @@ -21,21 +21,22 @@ class CategoryPermissionHandler extends SingletonFactory { * cached category acl options * @var array */ - protected $categoryPermissions = array(); + protected $categoryPermissions = []; /** * Returns the acl options for the given category and for the given user. * If no user is given, the active user is used. * - * @param \wcf\data\category\Category $category - * @param \wcf\data\user\User $user + * @param Category $category + * @param User $user + * @return integer[] */ public function getPermissions(Category $category, User $user = null) { if ($user === null) { $user = WCF::getUser(); } - $permissions = array(); + $permissions = []; if (isset($this->categoryPermissions[$category->categoryID])) { if (isset($this->categoryPermissions[$category->categoryID]['group'])) { foreach ($user->getGroupIDs() as $groupID) { @@ -63,7 +64,7 @@ class CategoryPermissionHandler extends SingletonFactory { } /** - * @see \wcf\system\SingletonFactory::init() + * @inheritDoc */ protected function init() { $this->categoryPermissions = CategoryACLOptionCacheBuilder::getInstance()->getData(); diff --git a/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php b/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php index 77f6bf9ccd..1ee0b86303 100644 --- a/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php @@ -265,6 +265,7 @@ class ClipboardHandler extends SingletonFactory { * Loads a list of marked items grouped by type name. * * @param integer $objectTypeID + * @return array */ public function getMarkedItems($objectTypeID = null) { if ($this->markedItems === null) { diff --git a/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php b/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php index 6086e25a1b..abcd54378f 100644 --- a/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php +++ b/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php @@ -194,7 +194,7 @@ class MySQLDatabaseEditor extends DatabaseEditor { * * @param string $columnName * @param array $columnData - * @param string + * @return string */ protected function buildColumnDefinition($columnName, $columnData) { // column name @@ -226,7 +226,7 @@ class MySQLDatabaseEditor extends DatabaseEditor { * * @param string $indexName * @param array $indexData - * @param string + * @return string */ protected function buildIndexDefinition($indexName, $indexData) { $definition = ""; diff --git a/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php b/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php index 9389b40eaf..487bba992c 100644 --- a/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php +++ b/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php @@ -329,7 +329,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { * * @param string $columnName * @param array $columnData - * @param string + * @return string */ protected function buildColumnDefinition($columnName, $columnData) { // column name @@ -363,7 +363,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { * Builds a column type for execution in a create table or alter table statement. * * @param array $columnData - * @param string + * @return string */ protected function buildColumnType($columnData) { $definition = strtoupper($columnData['type']); @@ -385,7 +385,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { * Converts a MySQL column type to the matching PostgreSQL column type. * * @param string $mySQLType - * @param string + * @return string */ protected function getColumnType($mySQLType) { switch ($mySQLType) { diff --git a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php index 63ce3b0b7e..2b0260a592 100644 --- a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php +++ b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php @@ -167,9 +167,10 @@ class MessageQuoteManager extends SingletonFactory { } /** - * Removes a quote from storage. + * Removes a quote from storage and returns true if the quote has successfully been removed. * * @param string $quoteID + * @return boolean */ public function removeQuote($quoteID) { if (!isset($this->quoteData[$quoteID])) { @@ -265,6 +266,7 @@ class MessageQuoteManager extends SingletonFactory { * Returns a list of quotes. * * @param boolean $supportPaste + * @return string */ public function getQuotes($supportPaste = false) { $template = ''; diff --git a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php index 85078a2d50..e7b7c94289 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php @@ -221,6 +221,7 @@ class PackageUpdateDispatcher extends SingletonFactory { * * @param \DOMXPath $xpath * @param \DOMNode $package + * @return array */ protected function parsePackageUpdateXMLBlock(\DOMXPath $xpath, \DOMNode $package) { // define default values diff --git a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php index 99eeaa8072..ca4bdf8209 100644 --- a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php +++ b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php @@ -16,7 +16,7 @@ use wcf\util\UserUtil; * and released under the conditions of the GNU Lesser General Public License. * * @author Alexander Ebert - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf * @subpackage system.recaptcha @@ -25,12 +25,10 @@ use wcf\util\UserUtil; class RecaptchaHandler extends SingletonFactory { /** * list of supported languages - * @var array + * @var string[] * @see http://code.google.com/intl/de-DE/apis/recaptcha/docs/customization.html#i18n */ - protected $supportedLanguages = array( - 'de', 'en', 'es', 'fr', 'nl', 'pt', 'ru', 'tr' - ); + protected $supportedLanguages = ['de', 'en', 'es', 'fr', 'nl', 'pt', 'ru', 'tr']; /** * language code @@ -62,7 +60,7 @@ class RecaptchaHandler extends SingletonFactory { const ERROR_NOT_REACHABLE = 'recaptcha-not-reachable'; /** - * @see \wcf\system\SingletonFactory::init() + * @inheritDoc */ protected function init() { // set appropriate language code, fallback to EN if language code is not known to reCAPTCHA-API @@ -122,14 +120,15 @@ class RecaptchaHandler extends SingletonFactory { * * @param string $challenge * @param string $response + * @return string */ protected function verify($challenge, $response) { - $request = new HTTPRequest('http://www.google.com/recaptcha/api/verify', array('timeout' => 10), array( + $request = new HTTPRequest('http://www.google.com/recaptcha/api/verify', ['timeout' => 10], [ 'privatekey' => $this->privateKey, 'remoteip' => UserUtil::getIpAddress(), 'challenge' => $challenge, 'response' => $response - )); + ]); try { $request->execute(); @@ -152,11 +151,11 @@ class RecaptchaHandler extends SingletonFactory { * Assigns template variables for reCAPTCHA. */ public function assignVariables() { - WCF::getTPL()->assign(array( + WCF::getTPL()->assign([ 'recaptchaLanguageCode' => $this->languageCode, 'recaptchaPublicKey' => $this->publicKey, 'recaptchaUseSSL' => RouteHandler::secureConnection(), // @deprecated since 2.1 'recaptchaLegacyMode' => true - )); + ]); } } diff --git a/wcfsetup/install/files/lib/system/search/AbstractSearchEngine.class.php b/wcfsetup/install/files/lib/system/search/AbstractSearchEngine.class.php index f5ee7d51a3..398b105040 100644 --- a/wcfsetup/install/files/lib/system/search/AbstractSearchEngine.class.php +++ b/wcfsetup/install/files/lib/system/search/AbstractSearchEngine.class.php @@ -1,5 +1,6 @@ * @package com.woltlab.wcf * @subpackage system.search @@ -19,16 +20,16 @@ abstract class AbstractSearchEngine extends SingletonFactory implements ISearchE * class name for preferred condition builder * @var string */ - protected $conditionBuilderClassName = 'wcf\system\database\util\PreparedStatementConditionBuilder'; + protected $conditionBuilderClassName = PreparedStatementConditionBuilder::class; /** * list of engine-specific special characters - * @var array + * @var string[] */ - protected $specialCharacters = array(); + protected $specialCharacters = []; /** - * @see \wcf\system\search\ISearchEngine::getConditionBuilderClassName() + * @inheritDoc */ public function getConditionBuilderClassName() { return $this->conditionBuilderClassName; @@ -44,6 +45,7 @@ abstract class AbstractSearchEngine extends SingletonFactory implements ISearchE * @see http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html * * @param string $query + * @return string */ protected function parseSearchQuery($query) { $query = StringUtil::trim($query); @@ -52,7 +54,7 @@ abstract class AbstractSearchEngine extends SingletonFactory implements ISearchE $inQuotes = false; $previousChar = $tmp = ''; $controlCharacterOrSpace = false; - $chars = array('+', '-', '*'); + $chars = ['+', '-', '*']; $ftMinWordLen = $this->getFulltextMinimumWordLength(); for ($i = 0, $length = mb_strlen($query); $i < $length; $i++) { $char = mb_substr($query, $i, 1); @@ -131,7 +133,7 @@ abstract class AbstractSearchEngine extends SingletonFactory implements ISearchE abstract protected function getFulltextMinimumWordLength(); /** - * @see \wcf\system\search\ISearchEngine::removeSpecialCharacters() + * @inheritDoc */ public function removeSpecialCharacters($string) { if (!empty($this->specialCharacters)) { diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 731c24bda2..7644add1e9 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -300,6 +300,7 @@ class TemplateScriptingCompiler { * @param string $tag * @param string $identifier * @param array $metaData + * @return string */ protected function compileTag($tag, $identifier, array &$metaData) { if (preg_match('~^'.$this->outputPattern.'~s', $tag)) { diff --git a/wcfsetup/install/files/lib/util/PasswordUtil.class.php b/wcfsetup/install/files/lib/util/PasswordUtil.class.php index 2c06c22f96..1eb596a98a 100644 --- a/wcfsetup/install/files/lib/util/PasswordUtil.class.php +++ b/wcfsetup/install/files/lib/util/PasswordUtil.class.php @@ -522,6 +522,7 @@ final class PasswordUtil { * @param string $password * @param string $salt * @param string $dbHash + * @return boolean */ protected static function wcf1e($type, $password, $salt, $dbHash) { preg_match('~^wcf1e([cms])([01])([ab])([01])$~', $type, $matches);