From 6f37a5f5bedd19bacaaaef5584fa2cd0ee34074e Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 21 May 2016 14:56:42 +0200 Subject: [PATCH] Add missing parameter documentation --- .../lib/acp/form/LabelGroupAddForm.class.php | 2 + .../lib/acp/page/CacheListPage.class.php | 7 ++-- .../AbstractDatabaseObjectAction.class.php | 7 +++- .../files/lib/data/DatabaseObject.class.php | 1 + .../data/TLegacyUserPropertyAccess.class.php | 5 +++ .../GroupedAttachmentList.class.php | 1 + .../item/ClipboardItemAction.class.php | 2 +- .../data/language/LanguageEditor.class.php | 3 ++ .../files/lib/data/like/LikeAction.class.php | 1 + .../files/lib/data/style/Style.class.php | 7 ++++ .../lib/data/user/avatar/Gravatar.class.php | 1 + .../files/lib/system/ad/AdHandler.class.php | 1 + .../attachment/AttachmentHandler.class.php | 1 + .../lib/system/bbcode/CodeBBCode.class.php | 1 + .../lib/system/bbcode/MessageParser.class.php | 3 +- .../bbcode/highlighter/Highlighter.class.php | 21 ++++++++++ .../builder/ACPMenuCacheBuilder.class.php | 1 + .../system/category/ICategoryType.class.php | 2 + .../system/cli/command/ICLICommand.class.php | 2 + .../action/UserClipboardAction.class.php | 2 + .../lib/system/database/Database.class.php | 1 + .../database/PostgreSQLDatabase.class.php | 5 ++- .../files/lib/system/io/ZipWriter.class.php | 1 + .../lib/system/language/I18nHandler.class.php | 1 + .../lib/system/like/LikeHandler.class.php | 41 ++++++++++--------- .../files/lib/system/mail/Mail.class.php | 5 ++- .../user/profile/UserProfileMenu.class.php | 1 + .../queue/IModerationQueueHandler.class.php | 1 + .../ISearchableConditionUserOption.class.php | 14 ++++--- .../option/user/UserOptionHandler.class.php | 2 + .../PackageInstallationDispatcher.class.php | 1 + .../PackageInstallationFileHandler.class.php | 7 ++-- .../PackageValidationArchive.class.php | 1 + .../system/template/TemplateEngine.class.php | 2 +- .../TemplateScriptingCompiler.class.php | 13 ++++++ ...CheckboxesFunctionTemplatePlugin.class.php | 3 ++ .../PagesFunctionTemplatePlugin.class.php | 1 + .../files/lib/util/CronjobUtil.class.php | 1 + .../install/files/lib/util/Diff.class.php | 1 + .../files/lib/util/HeaderUtil.class.php | 4 ++ .../files/lib/util/ImageUtil.class.php | 1 + .../files/lib/util/PasswordUtil.class.php | 11 +++-- .../files/lib/util/StringStack.class.php | 1 + .../files/lib/util/StringUtil.class.php | 12 ++++++ .../lib/util/UserRegistrationUtil.class.php | 2 + 45 files changed, 163 insertions(+), 41 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php b/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php index 6a71eb8c3c..067ca7d9fd 100644 --- a/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php @@ -268,6 +268,8 @@ class LabelGroupAddForm extends AbstractForm { /** * Sets object type relations. + * + * @param array|null $data */ protected function setObjectTypeRelations($data = null) { if (!empty($_POST)) { diff --git a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php index b116afcd3a..e5270ae7b3 100755 --- a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php @@ -99,9 +99,10 @@ class CacheListPage extends AbstractPage { /** * Reads the information of cached files * - * @param string $cacheType - * @param string $cacheDir - * @param \wcf\system\Regex $ignore + * @param string $cacheType + * @param string $cacheDir + * @param Regex $ignore + * @param string $extension */ protected function readCacheFiles($cacheType, $cacheDir, Regex $ignore = null, $extension = 'php') { if (!isset($this->cacheData[$cacheType])) { diff --git a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php index 951d872ed9..34daad25a3 100644 --- a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php +++ b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php @@ -155,8 +155,13 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID /** * This function can be overridden in children to perform custom initialization * of a DBOAction before the 'initializeAction' event is fired. + * + * @param string $baseClass + * @param string $indexName */ - protected function __init($baseClass, $indexName) { } + protected function __init($baseClass, $indexName) { + // does nothing + } /** * @inheritDoc diff --git a/wcfsetup/install/files/lib/data/DatabaseObject.class.php b/wcfsetup/install/files/lib/data/DatabaseObject.class.php index 724681e7de..0277786bd6 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObject.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObject.class.php @@ -160,6 +160,7 @@ abstract class DatabaseObject implements IStorableObject { * @param DatabaseObject[] $objects * @param mixed $sortBy * @param string $sortOrder + * @param boolean $maintainIndexAssociation */ public static function sort(&$objects, $sortBy, $sortOrder = 'ASC', $maintainIndexAssociation = true) { $sortArray = $objects2 = []; diff --git a/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php b/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php index d66c7c8fa0..e8d2cb2c4d 100644 --- a/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php +++ b/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php @@ -15,7 +15,12 @@ namespace wcf\data; */ trait TLegacyUserPropertyAccess { /** + * Returns the value of a object data variable with the given name. + * * @see \wcf\data\IStorableObject::__get() + * + * @param string $name + * @return mixed */ public function __get($name) { $value = parent::__get($name); diff --git a/wcfsetup/install/files/lib/data/attachment/GroupedAttachmentList.class.php b/wcfsetup/install/files/lib/data/attachment/GroupedAttachmentList.class.php index c1e25c82a9..f71150f721 100644 --- a/wcfsetup/install/files/lib/data/attachment/GroupedAttachmentList.class.php +++ b/wcfsetup/install/files/lib/data/attachment/GroupedAttachmentList.class.php @@ -82,6 +82,7 @@ class GroupedAttachmentList extends AttachmentList { /** * Returns the objects of the list. * + * @param integer $objectID * @return Attachment[] */ public function getGroupedObjects($objectID) { diff --git a/wcfsetup/install/files/lib/data/clipboard/item/ClipboardItemAction.class.php b/wcfsetup/install/files/lib/data/clipboard/item/ClipboardItemAction.class.php index 976901e2dc..0d864966fc 100644 --- a/wcfsetup/install/files/lib/data/clipboard/item/ClipboardItemAction.class.php +++ b/wcfsetup/install/files/lib/data/clipboard/item/ClipboardItemAction.class.php @@ -28,7 +28,7 @@ class ClipboardItemAction extends AbstractDatabaseObjectAction { * This is a heavily modified constructor which behaves differently from other DBOActions, * primarily because this class just masquerades as a regular DBOAction. * - * @see \wcf\data\AbstractDatabaseObjectAction + * @inheritDoc */ public function __construct(array $objects, $action, array $parameters = []) { $this->action = $action; diff --git a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index df05e96267..41f81e28fb 100644 --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@ -114,6 +114,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje /** * Exports this language. + * + * @param integer[] $packageIDArray + * @param boolean $exportCustomValues */ public function export($packageIDArray = [], $exportCustomValues = false) { $conditions = new PreparedStatementConditionBuilder(); diff --git a/wcfsetup/install/files/lib/data/like/LikeAction.class.php b/wcfsetup/install/files/lib/data/like/LikeAction.class.php index f39d835bd9..703624e9e1 100644 --- a/wcfsetup/install/files/lib/data/like/LikeAction.class.php +++ b/wcfsetup/install/files/lib/data/like/LikeAction.class.php @@ -155,6 +155,7 @@ class LikeAction extends AbstractDatabaseObjectAction implements IGroupedUserLis * Sets like/dislike for an object, executing this method again with the same parameters * will revert the status (removing like/dislike). * + * @param integer $likeValue * @return array */ protected function updateLike($likeValue) { diff --git a/wcfsetup/install/files/lib/data/style/Style.class.php b/wcfsetup/install/files/lib/data/style/Style.class.php index 8778548956..4b291bb6e8 100644 --- a/wcfsetup/install/files/lib/data/style/Style.class.php +++ b/wcfsetup/install/files/lib/data/style/Style.class.php @@ -128,6 +128,9 @@ class Style extends DatabaseObject { /** * TODO: add documentation + * + * @param string $variables + * @return array * @since 2.2 */ public static function splitLessVariables($variables) { @@ -141,6 +144,10 @@ class Style extends DatabaseObject { /** * TODO: add documentation + * + * @param string $preset + * @param string $custom + * @return string * @since 2.2 */ public static function joinLessVariables($preset, $custom) { diff --git a/wcfsetup/install/files/lib/data/user/avatar/Gravatar.class.php b/wcfsetup/install/files/lib/data/user/avatar/Gravatar.class.php index 29714a6b16..2a059df527 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/Gravatar.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/Gravatar.class.php @@ -65,6 +65,7 @@ class Gravatar extends DefaultAvatar { * * @param integer $userID * @param string $gravatar + * @param string $fileExtension */ public function __construct($userID, $gravatar, $fileExtension = 'png') { $this->userID = $userID; diff --git a/wcfsetup/install/files/lib/system/ad/AdHandler.class.php b/wcfsetup/install/files/lib/system/ad/AdHandler.class.php index 2468b40364..b35ae832e7 100644 --- a/wcfsetup/install/files/lib/system/ad/AdHandler.class.php +++ b/wcfsetup/install/files/lib/system/ad/AdHandler.class.php @@ -68,6 +68,7 @@ class AdHandler extends SingletonFactory { /** * Returns all available ad location object types. * + * @param string|null $categoryName * @return ObjectType[] */ public function getLocationObjectTypes($categoryName = null) { diff --git a/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php b/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php index 60237c52ee..5eeb575ed0 100644 --- a/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php +++ b/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php @@ -60,6 +60,7 @@ class AttachmentHandler implements \Countable { * @param string $objectType * @param integer $objectID * @param string $tmpHash + * @param integer $parentObjectID * @throws SystemException */ public function __construct($objectType, $objectID, $tmpHash = '', $parentObjectID = 0) { diff --git a/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php index a6c15eaa40..be54ef86e2 100644 --- a/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/CodeBBCode.class.php @@ -226,6 +226,7 @@ class CodeBBCode extends AbstractBBCode { * * @param string $code * @param integer $start + * @param string $split * @return string */ protected static function makeLineNumbers($code, $start, $split = "\n") { diff --git a/wcfsetup/install/files/lib/system/bbcode/MessageParser.class.php b/wcfsetup/install/files/lib/system/bbcode/MessageParser.class.php index 56341dc93b..00678737f4 100644 --- a/wcfsetup/install/files/lib/system/bbcode/MessageParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/MessageParser.class.php @@ -130,7 +130,8 @@ class MessageParser extends BBCodeParser { * Parses smiley codes. * * @param string $text - * @return string text + * @param boolean $enableHtml + * @return string */ protected function parseSmilies($text, $enableHtml = false) { foreach ($this->smilies as $code => $html) { diff --git a/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php b/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php index c5b701acba..a760c4ae96 100644 --- a/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php @@ -225,6 +225,9 @@ abstract class Highlighter extends SingletonFactory { /** * Caches comments. + * + * @param string $string + * @return string */ protected function cacheComments($string) { if ($this->cacheCommentsRegEx !== null) { @@ -248,6 +251,9 @@ abstract class Highlighter extends SingletonFactory { /** * Caches quotes. + * + * @param string $string + * @return string */ protected function cacheQuotes($string) { if ($this->quotesRegEx !== null) { @@ -261,6 +267,9 @@ abstract class Highlighter extends SingletonFactory { /** * Highlights operators. + * + * @param string $string + * @return string */ protected function highlightOperators($string) { if (!empty($this->operators)) { @@ -272,6 +281,9 @@ abstract class Highlighter extends SingletonFactory { /** * Highlights keywords. + * + * @param string $string + * @return string */ protected function highlightKeywords($string) { $_this = $this; @@ -300,6 +312,9 @@ abstract class Highlighter extends SingletonFactory { /** * Highlights numbers. + * + * @param string $string + * @return string */ protected function highlightNumbers($string) { $string = preg_replace('!(?<='.$this->separatorsRegEx.')(-?\d+)(?='.$this->separatorsRegEx.')!i', '\\0', $string); @@ -309,6 +324,9 @@ abstract class Highlighter extends SingletonFactory { /** * Highlights quotes. + * + * @param string $string + * @return string */ protected function highlightQuotes($string) { return StringStack::reinsertStrings($string, 'highlighterQuotes'); @@ -316,6 +334,9 @@ abstract class Highlighter extends SingletonFactory { /** * Highlights comments. + * + * @param string $string + * @return string */ protected function highlightComments($string) { return StringStack::reinsertStrings($string, 'highlighterComments'); diff --git a/wcfsetup/install/files/lib/system/cache/builder/ACPMenuCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/ACPMenuCacheBuilder.class.php index d4fd5b5745..16642482df 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/ACPMenuCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/ACPMenuCacheBuilder.class.php @@ -105,6 +105,7 @@ class ACPMenuCacheBuilder extends AbstractCacheBuilder { * Returns true if the given category or one of its child categories contains * options. * + * @param OptionCategory $topCategory * @return boolean */ protected function containsOptions(OptionCategory $topCategory) { diff --git a/wcfsetup/install/files/lib/system/category/ICategoryType.class.php b/wcfsetup/install/files/lib/system/category/ICategoryType.class.php index 50fdbe68ec..676a9eb233 100644 --- a/wcfsetup/install/files/lib/system/category/ICategoryType.class.php +++ b/wcfsetup/install/files/lib/system/category/ICategoryType.class.php @@ -55,6 +55,8 @@ interface ICategoryType { * newParentCategoryID => 2 * ], * ] + * + * @param array $categoryData */ public function changedParentCategories(array $categoryData); diff --git a/wcfsetup/install/files/lib/system/cli/command/ICLICommand.class.php b/wcfsetup/install/files/lib/system/cli/command/ICLICommand.class.php index 1ec0de2b89..e1a0eca8f0 100644 --- a/wcfsetup/install/files/lib/system/cli/command/ICLICommand.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/ICLICommand.class.php @@ -14,6 +14,8 @@ namespace wcf\system\cli\command; interface ICLICommand { /** * Executes the command. + * + * @param array $parameters */ public function execute(array $parameters); diff --git a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php index 6b69f7c995..19b8093d96 100644 --- a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php @@ -117,6 +117,8 @@ class UserClipboardAction extends AbstractClipboardAction { /** * Validates accessible groups. * + * @param integer[] $userIDs + * @param boolean $ignoreOwnUser * @return integer[] */ protected function __validateAccessibleGroups(array $userIDs, $ignoreOwnUser = true) { diff --git a/wcfsetup/install/files/lib/system/database/Database.class.php b/wcfsetup/install/files/lib/system/database/Database.class.php index 6ce0630fa7..b544e8fcac 100644 --- a/wcfsetup/install/files/lib/system/database/Database.class.php +++ b/wcfsetup/install/files/lib/system/database/Database.class.php @@ -99,6 +99,7 @@ abstract class Database { * @param string $password SQL database server password * @param string $database SQL database server database name * @param integer $port SQL database server port + * @param boolean $failsafeTest */ public function __construct($host, $user, $password, $database, $port, $failsafeTest = false) { $this->host = $host; diff --git a/wcfsetup/install/files/lib/system/database/PostgreSQLDatabase.class.php b/wcfsetup/install/files/lib/system/database/PostgreSQLDatabase.class.php index 04f66c7361..030c4e930b 100644 --- a/wcfsetup/install/files/lib/system/database/PostgreSQLDatabase.class.php +++ b/wcfsetup/install/files/lib/system/database/PostgreSQLDatabase.class.php @@ -111,7 +111,10 @@ class PostgreSQLDatabase extends Database { } /** - * Callback function used in fixQuery() + * Callback function used in fixQuery(). + * + * @param string[] $matches + * @return string */ private static function replaceQuotesCallback($matches) { return StringStack::pushToStringStack($matches[0], 'postgresQuotes'); diff --git a/wcfsetup/install/files/lib/system/io/ZipWriter.class.php b/wcfsetup/install/files/lib/system/io/ZipWriter.class.php index e50ca65d9f..161a8097c9 100644 --- a/wcfsetup/install/files/lib/system/io/ZipWriter.class.php +++ b/wcfsetup/install/files/lib/system/io/ZipWriter.class.php @@ -24,6 +24,7 @@ class ZipWriter { * Adds a folder to the Zip archive. * * @param string $name dirname + * @param integer $date */ public function addDir($name, $date = TIME_NOW) { // replace backward slashes with forward slashes in the dirname diff --git a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php index 21fb708472..056eb41835 100644 --- a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php +++ b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php @@ -120,6 +120,7 @@ class I18nHandler extends SingletonFactory { /** * Returns true if given element has enabled i18n functionality. * + * @param string $elementID * @return boolean */ public function hasI18nValues($elementID) { diff --git a/wcfsetup/install/files/lib/system/like/LikeHandler.class.php b/wcfsetup/install/files/lib/system/like/LikeHandler.class.php index 54d25ebc96..6a09218e7a 100644 --- a/wcfsetup/install/files/lib/system/like/LikeHandler.class.php +++ b/wcfsetup/install/files/lib/system/like/LikeHandler.class.php @@ -61,7 +61,8 @@ class LikeHandler extends SingletonFactory { /** * Returns an object type from cache. * - * @return \wcf\data\object\type\ObjectType + * @param string $objectName + * @return ObjectType */ public function getObjectType($objectName) { if (isset($this->cache[$objectName])) { @@ -74,9 +75,9 @@ class LikeHandler extends SingletonFactory { /** * Gets a like object. * - * @param \wcf\data\object\type\ObjectType $objectType - * @param integer $objectID - * @return \wcf\data\like\object\LikeObject + * @param ObjectType $objectType + * @param integer $objectID + * @return LikeObject */ public function getLikeObject(ObjectType $objectType, $objectID) { if (isset($this->likeObjectCache[$objectType->objectTypeID][$objectID])) { @@ -89,7 +90,7 @@ class LikeHandler extends SingletonFactory { /** * Gets the like objects of a specific object type. * - * @param \wcf\data\object\type\ObjectType $objectType + * @param ObjectType $objectType * @return LikeObject[] */ public function getLikeObjects(ObjectType $objectType) { @@ -104,8 +105,8 @@ class LikeHandler extends SingletonFactory { * Loads the like data for a set of objects and returns the number of loaded * like objects * - * @param \wcf\data\object\type\ObjectType $objectType - * @param array $objectIDs + * @param ObjectType $objectType + * @param array $objectIDs * @return integer */ public function loadLikeObjects(ObjectType $objectType, array $objectIDs) { @@ -151,10 +152,10 @@ class LikeHandler extends SingletonFactory { /** * Saves the like of an object. * - * @param \wcf\data\like\object\ILikeObject $likeable - * @param \wcf\data\user\User $user - * @param integer $likeValue - * @param integer $time + * @param ILikeObject $likeable + * @param User $user + * @param integer $likeValue + * @param integer $time * @return array */ public function like(ILikeObject $likeable, User $user, $likeValue, $time = TIME_NOW) { @@ -330,10 +331,10 @@ class LikeHandler extends SingletonFactory { /** * Reverts the like of an object. * - * @param \wcf\data\like\Like $like - * @param \wcf\data\like\object\ILikeObject $likeable - * @param \wcf\data\like\object\LikeObject $likeObject - * @param \wcf\data\user\User $user + * @param Like $like + * @param ILikeObject $likeable + * @param LikeObject $likeObject + * @param User $user * @return array */ public function revertLike(Like $like, ILikeObject $likeable, LikeObject $likeObject, User $user) { @@ -418,9 +419,9 @@ class LikeHandler extends SingletonFactory { /** * Removes all likes for given objects. * - * @param string $objectType - * @param integer[] $objectIDs - * @param string[] $notificationObjectTypes + * @param string $objectType + * @param integer[] $objectIDs + * @param string[] $notificationObjectTypes */ public function removeLikes($objectType, array $objectIDs, array $notificationObjectTypes = []) { $objectTypeObj = $this->getObjectType($objectType); @@ -491,8 +492,8 @@ class LikeHandler extends SingletonFactory { /** * Returns current like object status. * - * @param \wcf\data\like\object\LikeObject $likeObject - * @param \wcf\data\user\User $user + * @param LikeObject $likeObject + * @param User $user * @return array */ protected function loadLikeStatus(LikeObject $likeObject, User $user) { diff --git a/wcfsetup/install/files/lib/system/mail/Mail.class.php b/wcfsetup/install/files/lib/system/mail/Mail.class.php index 765215dd3e..aca7676bd6 100644 --- a/wcfsetup/install/files/lib/system/mail/Mail.class.php +++ b/wcfsetup/install/files/lib/system/mail/Mail.class.php @@ -111,7 +111,7 @@ class Mail { * @param string $cc * @param string $bcc * @param array $attachments - * @param integer $priority + * @param integer|string $priority * @param string $header */ public function __construct($to = '', $subject = '', $message = '', $from = '', $cc = '', $bcc = '', $attachments = [], $priority = '', $header = '') { @@ -526,6 +526,9 @@ class Mail { /** * Encodes string for MIME header. + * + * @param string $string + * @return string */ public static function encodeMIMEHeader($string) { if (function_exists('mb_encode_mimeheader')) { diff --git a/wcfsetup/install/files/lib/system/menu/user/profile/UserProfileMenu.class.php b/wcfsetup/install/files/lib/system/menu/user/profile/UserProfileMenu.class.php index 542d28d38c..d466d62412 100644 --- a/wcfsetup/install/files/lib/system/menu/user/profile/UserProfileMenu.class.php +++ b/wcfsetup/install/files/lib/system/menu/user/profile/UserProfileMenu.class.php @@ -121,6 +121,7 @@ class UserProfileMenu extends SingletonFactory { /** * Returns a specific menu item. * + * @param string $menuItem * @return UserProfileMenuItem */ public function getMenuItem($menuItem) { diff --git a/wcfsetup/install/files/lib/system/moderation/queue/IModerationQueueHandler.class.php b/wcfsetup/install/files/lib/system/moderation/queue/IModerationQueueHandler.class.php index 0a072a3743..894e7a1e95 100644 --- a/wcfsetup/install/files/lib/system/moderation/queue/IModerationQueueHandler.class.php +++ b/wcfsetup/install/files/lib/system/moderation/queue/IModerationQueueHandler.class.php @@ -64,6 +64,7 @@ interface IModerationQueueHandler { /** * Returns true if the affected content may be removed. * + * @param ModerationQueue $queue * @return boolean */ public function canRemoveContent(ModerationQueue $queue); diff --git a/wcfsetup/install/files/lib/system/option/ISearchableConditionUserOption.class.php b/wcfsetup/install/files/lib/system/option/ISearchableConditionUserOption.class.php index 0ba1b54181..cf8f4c9cfe 100644 --- a/wcfsetup/install/files/lib/system/option/ISearchableConditionUserOption.class.php +++ b/wcfsetup/install/files/lib/system/option/ISearchableConditionUserOption.class.php @@ -19,9 +19,9 @@ interface ISearchableConditionUserOption extends ISearchableUserOption { * Adds the condition to the given user list to fetch the users which have * the given value for the given option. * - * @param \wcf\data\user\UserList $userList - * @param \wcf\data\option\Option $option - * @param mixed $value + * @param UserList $userList + * @param Option $option + * @param mixed $value */ public function addCondition(UserList $userList, Option $option, $value); @@ -29,9 +29,9 @@ interface ISearchableConditionUserOption extends ISearchableUserOption { * Returns true if given the user option of the given user matches a certain * value. * - * @param \wcf\data\user\User $user - * @param \wcf\data\option\Option $option - * @param mixed $value + * @param User $user + * @param Option $option + * @param mixed $value * @return boolean */ public function checkUser(User $user, Option $option, $value); @@ -39,6 +39,8 @@ interface ISearchableConditionUserOption extends ISearchableUserOption { /** * Returns the data of the condition or null if the option should be igored. * + * @param Option $option + * @param mixed $newValue * @return mixed */ public function getConditionData(Option $option, $newValue); diff --git a/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php b/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php index 141e9827c3..f45d2a81b9 100644 --- a/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php +++ b/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php @@ -66,6 +66,8 @@ class UserOptionHandler extends OptionHandler { /** * Shows empty options. + * + * @param boolean $show */ public function showEmptyOptions($show = true) { $this->removeEmptyOptions = !$show; diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 0fc1c923c4..d3711ff404 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -784,6 +784,7 @@ class PackageInstallationDispatcher { /** * Prompts a selection of optional packages. * + * @param string[][] $packages * @return mixed */ protected function promptOptionalPackages(array $packages) { diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationFileHandler.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationFileHandler.class.php index e6b556556c..29729f9312 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationFileHandler.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationFileHandler.class.php @@ -16,20 +16,21 @@ use wcf\system\setup\IFileHandler; abstract class PackageInstallationFileHandler implements IFileHandler { /** * abbrevation of the application the files belong to - * @var string[] + * @var string */ protected $application = ''; /** * active package installation dispatcher - * @var \wcf\system\package\PackageInstallationDispatcher + * @var PackageInstallationDispatcher */ protected $packageInstallation; /** * Creates a new PackageInstallationFileHandler object. * - * @param \wcf\system\package\PackageInstallationDispatcher $packageInstallation + * @param PackageInstallationDispatcher $packageInstallation + * @param string $application */ public function __construct(PackageInstallationDispatcher $packageInstallation, $application) { $this->packageInstallation = $packageInstallation; diff --git a/wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php b/wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php index 6f17306c94..498e4b6294 100644 --- a/wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php +++ b/wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php @@ -83,6 +83,7 @@ class PackageValidationArchive implements \RecursiveIterator { * mode will toggle between different checks. * * @param integer $validationMode + * @param string $requiredVersion * @return boolean */ public function validate($validationMode, $requiredVersion = '') { diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index ff5b1d68ab..92f620e153 100755 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -720,7 +720,7 @@ class TemplateEngine extends SingletonFactory { * * @deprecated */ - public function hasTemplateListeners($templateName, $application = 'wcf') { + public function hasTemplateListeners() { return false; } diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 5d40083392..1da4908cf9 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -1125,6 +1125,7 @@ class TemplateScriptingCompiler { * Compiles a variable tag and returns the compiled PHP code. * * @param string $tag + * @param boolean $replaceQuotes * @return string * @throws SystemException */ @@ -1518,6 +1519,9 @@ class TemplateScriptingCompiler { /** * Callback function used in replaceLiterals() + * + * @param string[] $matches + * @return string */ private function replaceLiteralsCallback($matches) { return StringStack::pushToStringStack($matches[1], 'literal'); @@ -1548,6 +1552,9 @@ class TemplateScriptingCompiler { /** * Callback function used in replaceQuotes() + * + * @param string[] $matches + * @return string */ private function replaceSingleQuotesCallback($matches) { return StringStack::pushToStringStack($matches[0], 'singleQuote'); @@ -1555,6 +1562,9 @@ class TemplateScriptingCompiler { /** * Callback function used in replaceQuotes() + * + * @param string[] $matches + * @return string */ private function replaceDoubleQuotesCallback($matches) { // parse unescaped simple vars in double quotes @@ -1588,6 +1598,9 @@ class TemplateScriptingCompiler { /** * Callback function used in replaceConstants() + * + * @param string[] $matches + * @return string */ private function replaceConstantsCallback($matches) { return StringStack::pushToStringStack($matches[1], 'constants'); diff --git a/wcfsetup/install/files/lib/system/template/plugin/HtmlCheckboxesFunctionTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/HtmlCheckboxesFunctionTemplatePlugin.class.php index 3e2b672dfe..7a5041b1f7 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/HtmlCheckboxesFunctionTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/HtmlCheckboxesFunctionTemplatePlugin.class.php @@ -80,6 +80,9 @@ class HtmlCheckboxesFunctionTemplatePlugin implements IFunctionTemplatePlugin { /** * Executes StringUtil::encodeHTML on the given text if disableEncoding is false. * @see \wcf\util\StringUtil::encodeHTML() + * + * @param string $text + * @return string */ protected function encodeHTML($text) { if (!$this->disableEncoding) { diff --git a/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php index 93eef24058..d41c1b7ac9 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php @@ -88,6 +88,7 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin { * * @param string $link * @param integer $pageNo + * @param integer $pages * @return string */ protected function makeNextLink($link, $pageNo, $pages) { diff --git a/wcfsetup/install/files/lib/util/CronjobUtil.class.php b/wcfsetup/install/files/lib/util/CronjobUtil.class.php index 4eb5dc74e8..7986ae1092 100644 --- a/wcfsetup/install/files/lib/util/CronjobUtil.class.php +++ b/wcfsetup/install/files/lib/util/CronjobUtil.class.php @@ -323,6 +323,7 @@ final class CronjobUtil { * * @param array $values * @param integer $timeBase + * @param boolean $addAnDay * @return boolean */ protected static function calculateMinute(array &$values, &$timeBase, $addAnDay) { diff --git a/wcfsetup/install/files/lib/util/Diff.class.php b/wcfsetup/install/files/lib/util/Diff.class.php index 396644035c..dbfa8963bd 100644 --- a/wcfsetup/install/files/lib/util/Diff.class.php +++ b/wcfsetup/install/files/lib/util/Diff.class.php @@ -235,6 +235,7 @@ class Diff { /** * Returns a string like the one generated by unix diff. * + * @param integer $context * @return string */ public function getUnixDiff($context = 2) { diff --git a/wcfsetup/install/files/lib/util/HeaderUtil.class.php b/wcfsetup/install/files/lib/util/HeaderUtil.class.php index 13244aee78..dcdca1b592 100644 --- a/wcfsetup/install/files/lib/util/HeaderUtil.class.php +++ b/wcfsetup/install/files/lib/util/HeaderUtil.class.php @@ -36,6 +36,10 @@ final class HeaderUtil { /** * Alias to php setcookie() function. + * + * @param string $name + * @param string $value + * @param integer $expire */ public static function setCookie($name, $value = '', $expire = 0) { $application = ApplicationHandler::getInstance()->getActiveApplication(); diff --git a/wcfsetup/install/files/lib/util/ImageUtil.class.php b/wcfsetup/install/files/lib/util/ImageUtil.class.php index aff543f15d..958747c8df 100644 --- a/wcfsetup/install/files/lib/util/ImageUtil.class.php +++ b/wcfsetup/install/files/lib/util/ImageUtil.class.php @@ -16,6 +16,7 @@ final class ImageUtil { * Checks the content of an image for bad sections, e.g. the use of javascript * and returns false if any bad stuff was found. * + * @param string $file * @return boolean */ public static function checkImageContent($file) { diff --git a/wcfsetup/install/files/lib/util/PasswordUtil.class.php b/wcfsetup/install/files/lib/util/PasswordUtil.class.php index 02e836b00c..ba2b057238 100644 --- a/wcfsetup/install/files/lib/util/PasswordUtil.class.php +++ b/wcfsetup/install/files/lib/util/PasswordUtil.class.php @@ -219,16 +219,21 @@ final class PasswordUtil { public static function getRandomPassword($length = 12) { $charset = self::PASSWORD_CHARSET; $password = ''; - + for ($i = 0, $maxIndex = (strlen($charset) - 1); $i < $length; $i++) { $password .= $charset[self::secureRandomNumber(0, $maxIndex)]; } - + return $password; } /** - * @see \wcf\util\CryptoUtil::secureCompare() + * Compares two strings in a constant time manner. + * This function effectively is a polyfill for the PHP 5.6 `hash_equals`. + * + * @param string $hash1 + * @param string $hash2 + * @return boolean * @deprecated Use \wcf\util\CryptoUtil::secureCompare() */ public static function secureCompare($hash1, $hash2) { diff --git a/wcfsetup/install/files/lib/util/StringStack.class.php b/wcfsetup/install/files/lib/util/StringStack.class.php index 2756df5fe7..a0c52c8bf1 100644 --- a/wcfsetup/install/files/lib/util/StringStack.class.php +++ b/wcfsetup/install/files/lib/util/StringStack.class.php @@ -30,6 +30,7 @@ final class StringStack { * @param string $string * @param string $type * @return string $hash + * @param string $delimiter */ public static function pushToStringStack($string, $type = 'default', $delimiter = '@@') { self::$i++; diff --git a/wcfsetup/install/files/lib/util/StringUtil.class.php b/wcfsetup/install/files/lib/util/StringUtil.class.php index 33d2576fe6..446dc98172 100644 --- a/wcfsetup/install/files/lib/util/StringUtil.class.php +++ b/wcfsetup/install/files/lib/util/StringUtil.class.php @@ -361,6 +361,12 @@ final class StringUtil { * * This function is considered to be slow, if $search contains * only ASCII characters, please use str_ireplace() instead. + * + * @param string $search + * @param string $replace + * @param string $subject + * @param integer $count + * @return string */ public static function replaceIgnoreCase($search, $replace, $subject, &$count = 0) { $startPos = mb_strpos(mb_strtolower($subject), mb_strtolower($search)); @@ -425,6 +431,12 @@ final class StringUtil { /** * Alias to php str_pad function with multibyte support. + * + * @param string $input + * @param integer $padLength + * @param string $padString + * @param integer $padType + * @return string */ public static function pad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT) { $additionalPadding = strlen($input) - mb_strlen($input); diff --git a/wcfsetup/install/files/lib/util/UserRegistrationUtil.class.php b/wcfsetup/install/files/lib/util/UserRegistrationUtil.class.php index 381a61a453..ae51a02c0f 100644 --- a/wcfsetup/install/files/lib/util/UserRegistrationUtil.class.php +++ b/wcfsetup/install/files/lib/util/UserRegistrationUtil.class.php @@ -51,6 +51,7 @@ final class UserRegistrationUtil { /** * Returns false if the given name is a forbidden username. * + * @param string $name * @return boolean */ public static function checkForbiddenUsernames($name) { @@ -60,6 +61,7 @@ final class UserRegistrationUtil { /** * Returns false if the given email is a forbidden email. * + * @param string $email * @return boolean */ public static function checkForbiddenEmails($email) { -- 2.20.1