From: Matthias Schmidt Date: Wed, 6 Apr 2016 15:46:51 +0000 (+0200) Subject: Add throws tags X-Git-Tag: 3.0.0_Beta_1~1963 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b770bdd6d7767c0d8397df4e94edc91e03941a6;p=GitHub%2FWoltLab%2FWCF.git Add throws tags --- diff --git a/wcfsetup/install.php b/wcfsetup/install.php index 3610436b2c..c8e5ad088c 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -203,6 +203,7 @@ function handleException(\Exception $e) { * @param string $message * @param string $filename * @param integer $lineNo + * @throws SystemException */ function handleError($errorNo, $message, $filename, $lineNo) { if (error_reporting() != 0) { @@ -235,6 +236,7 @@ class BasicFileUtil { * Tries to find the temp folder. * * @return string + * @throws SystemException */ public static function getTempFolder() { // use tmp folder in document root by default @@ -302,6 +304,7 @@ class BasicFileUtil { * permissions and goes up until 0666 for files and 0777 for directories. * * @param string $filename + * @throws SystemException */ public static function makeWritable($filename) { if (!file_exists($filename)) { @@ -385,6 +388,7 @@ class Tar { * archiveName must be tarball or gzipped tarball * * @param string $archiveName + * @throws SystemException */ public function __construct($archiveName) { if (!is_file($archiveName)) { @@ -454,6 +458,7 @@ class Tar { * * @param mixed $fileIndex index or name of the requested file * @return array + * @throws SystemException */ public function getFileInfo($fileIndex) { if (!is_int($fileIndex)) { @@ -525,7 +530,8 @@ class Tar { * * @param mixed $index index or name of the requested file * @param string $destination - * @return boolean $success + * @return boolean + * @throws SystemException */ public function extract($index, $destination) { if (!$this->read) { @@ -699,6 +705,7 @@ class File { * * @param string $filename * @param string $mode + * @throws SystemException */ public function __construct($filename, $mode = 'wb') { $this->filename = $filename; @@ -715,6 +722,7 @@ class File { * @param string $function * @param array $arguments * @return mixed + * @throws SystemException */ public function __call($function, $arguments) { if (function_exists('f' . $function)) { @@ -749,6 +757,7 @@ class ZipFile extends File { * * @param string $filename * @param string $mode + * @throws SystemException */ public function __construct($filename, $mode = 'wb') { if (self::$gzopen64 === null) { @@ -771,6 +780,7 @@ class ZipFile extends File { * @param string $function * @param array $arguments * @return mixed + * @throws SystemException */ public function __call($function, $arguments) { if (self::$gzopen64 && function_exists('gz' . $function . '64')) { diff --git a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php index 0a5506d8e8..b936ccb9ea 100755 --- a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php @@ -109,6 +109,7 @@ class PackageStartInstallForm extends AbstractForm { * Validates the upload package input. * * @param string $filename + * @throws UserInputException */ protected function validateUploadPackage($filename = '') { $this->activeTabMenuItem = 'upload'; diff --git a/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php index 2259a87f85..d36091e500 100644 --- a/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php @@ -308,6 +308,7 @@ class UserAddForm extends UserOptionListForm { * Throws a UserInputException if the username is not unique or not valid. * * @param string $username + * @throws UserInputException */ protected function validateUsername($username) { if (empty($username)) { @@ -330,9 +331,10 @@ class UserAddForm extends UserOptionListForm { * * @param string $email * @param string $confirmEmail + * @throws UserInputException */ protected function validateEmail($email, $confirmEmail) { - if (empty($email)) { + if (empty($email)) { throw new UserInputException('email'); } @@ -357,6 +359,7 @@ class UserAddForm extends UserOptionListForm { * * @param string $password * @param string $confirmPassword + * @throws UserInputException */ protected function validatePassword($password, $confirmPassword) { if (empty($password)) { diff --git a/wcfsetup/install/files/lib/action/AJAXInvokeAction.class.php b/wcfsetup/install/files/lib/action/AJAXInvokeAction.class.php index e09d5f1a08..e906cc850f 100644 --- a/wcfsetup/install/files/lib/action/AJAXInvokeAction.class.php +++ b/wcfsetup/install/files/lib/action/AJAXInvokeAction.class.php @@ -152,6 +152,8 @@ class AJAXInvokeAction extends AbstractSecureAction { * Throws an previously catched exception while maintaing the propriate stacktrace. * * @param \Exception $e + * @throws AJAXException + * @throws \Exception */ protected function throwException(\Exception $e) { if ($this->inDebugMode) { @@ -229,6 +231,7 @@ class AJAXInvokeAction extends AbstractSecureAction { * * @param array $data * @return AJAXInvokeAction + * @throws SystemException */ public static function debugCall(array $data) { // validate $data array diff --git a/wcfsetup/install/files/lib/action/MessageQuoteAction.class.php b/wcfsetup/install/files/lib/action/MessageQuoteAction.class.php index 896ec8c841..04e4bcd427 100644 --- a/wcfsetup/install/files/lib/action/MessageQuoteAction.class.php +++ b/wcfsetup/install/files/lib/action/MessageQuoteAction.class.php @@ -152,6 +152,8 @@ class MessageQuoteAction extends AJAXProxyAction { * Removes a list of quotes from storage and returns the remaining count. * * @return integer + * @throws SystemException + * @throws UserInputException */ protected function remove() { if (empty($this->quoteIDs)) { @@ -182,6 +184,7 @@ class MessageQuoteAction extends AJAXProxyAction { * Returns a list of full quotes by object ids for given object types. * * @return array + * @throws UserInputException */ protected function getFullQuoteObjectIDs() { if (empty($this->objectTypes)) { diff --git a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php index f5afb7014f..2e593fe198 100644 --- a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php +++ b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php @@ -108,6 +108,7 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID * @param array $objects * @param string $action * @param array $parameters + * @throws SystemException */ public function __construct(array $objects, $action, array $parameters = array()) { // set class name @@ -399,7 +400,8 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID /** * Returns a single object and throws an UserInputException if no or more than one object is given. * - * @return \wcf\data\DatabaseObject + * @return DatabaseObject + * @throws UserInputException */ protected function getSingleObject() { if (empty($this->objects)) { @@ -492,6 +494,8 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID * @param string $arrayIndex * @param integer $type * @param integer $structure + * @throws SystemException + * @throws UserInputException */ protected function readValue($variableName, $allowEmpty, $arrayIndex, $type, $structure) { if ($arrayIndex) { diff --git a/wcfsetup/install/files/lib/data/DatabaseObjectDecorator.class.php b/wcfsetup/install/files/lib/data/DatabaseObjectDecorator.class.php index 5c2c76ea69..4dbeb3d60f 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObjectDecorator.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObjectDecorator.class.php @@ -28,7 +28,8 @@ abstract class DatabaseObjectDecorator extends DatabaseObject { /** * Creates a new DatabaseObjectDecorator object. * - * @param \wcf\data\DatabaseObject $object + * @param DatabaseObject $object + * @throws SystemException */ public function __construct(DatabaseObject $object) { if (empty(static::$baseClass)) { @@ -76,6 +77,7 @@ abstract class DatabaseObjectDecorator extends DatabaseObject { * @param string $name * @param array $arguments * @return mixed + * @throws SystemException */ public function __call($name, $arguments) { if (!method_exists($this->object, $name) && !($this->object instanceof DatabaseObjectDecorator)) { diff --git a/wcfsetup/install/files/lib/data/ProcessibleDatabaseObject.class.php b/wcfsetup/install/files/lib/data/ProcessibleDatabaseObject.class.php index d006a0baa3..5d00d6b727 100644 --- a/wcfsetup/install/files/lib/data/ProcessibleDatabaseObject.class.php +++ b/wcfsetup/install/files/lib/data/ProcessibleDatabaseObject.class.php @@ -29,6 +29,7 @@ class ProcessibleDatabaseObject extends DatabaseObject { * Returns the processor this database object. * * @return object + * @throws SystemException */ public function getProcessor() { if ($this->processor === null) { diff --git a/wcfsetup/install/files/lib/data/TMultiCategoryObject.class.php b/wcfsetup/install/files/lib/data/TMultiCategoryObject.class.php index 3ee64cdcae..476f22ff2d 100644 --- a/wcfsetup/install/files/lib/data/TMultiCategoryObject.class.php +++ b/wcfsetup/install/files/lib/data/TMultiCategoryObject.class.php @@ -54,6 +54,7 @@ trait TMultiCategoryObject { * Returns the categories of the object. * * @return AbstractDecoratedCategory[] + * @throws SystemException */ public function getCategories() { if ($this->categories === null) { diff --git a/wcfsetup/install/files/lib/data/application/Application.class.php b/wcfsetup/install/files/lib/data/application/Application.class.php index 3d781e9aa9..a8ba50f585 100644 --- a/wcfsetup/install/files/lib/data/application/Application.class.php +++ b/wcfsetup/install/files/lib/data/application/Application.class.php @@ -99,6 +99,7 @@ class Application extends DatabaseObject { * * @param string $abbreviation * @return string + * @throws SystemException */ public static function getDirectory($abbreviation) { if (static::$directories === null) { diff --git a/wcfsetup/install/files/lib/data/bbcode/MessagePreviewAction.class.php b/wcfsetup/install/files/lib/data/bbcode/MessagePreviewAction.class.php index 6fab3450b1..5bd506b68e 100644 --- a/wcfsetup/install/files/lib/data/bbcode/MessagePreviewAction.class.php +++ b/wcfsetup/install/files/lib/data/bbcode/MessagePreviewAction.class.php @@ -41,6 +41,7 @@ class MessagePreviewAction extends BBCodeAction { * Returns a rendered message preview. * * @return array + * @throws UserInputException */ public function getMessagePreview() { // get options diff --git a/wcfsetup/install/files/lib/data/category/CategoryNodeTree.class.php b/wcfsetup/install/files/lib/data/category/CategoryNodeTree.class.php index a23a3d4c10..e40d92cf7b 100644 --- a/wcfsetup/install/files/lib/data/category/CategoryNodeTree.class.php +++ b/wcfsetup/install/files/lib/data/category/CategoryNodeTree.class.php @@ -63,6 +63,7 @@ class CategoryNodeTree implements \IteratorAggregate { * @param integer $parentCategoryID * @param boolean $includeDisabledCategories * @param integer[] $excludedCategoryIDs + * @throws SystemException */ public function __construct($objectType, $parentCategoryID = 0, $includeDisabledCategories = false, array $excludedCategoryIDs = []) { $this->objectType = $objectType; diff --git a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php index ef1255bd39..d1f090a27e 100644 --- a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php +++ b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php @@ -618,6 +618,7 @@ class CommentAction extends AbstractDatabaseObjectAction { * them enter a username and solving a captcha. * * @return array + * @throws SystemException */ public function getGuestDialog() { $captchaObjectType = null; @@ -699,6 +700,7 @@ class CommentAction extends AbstractDatabaseObjectAction { * Validates object type id parameter. * * @return ObjectType + * @throws UserInputException */ protected function validateObjectType() { $this->readInteger('objectTypeID', false, 'data'); diff --git a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index de04c44442..8d525f31e5 100644 --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@ -303,8 +303,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje /** * Takes an XML object and returns the specific language code. * - * @param \wcf\util\XML $xml + * @param XML $xml * @return string + * @throws SystemException */ public static function readLanguageCodeFromXML(XML $xml) { $rootNode = $xml->xpath()->query('/ns:language')->item(0); @@ -321,8 +322,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje /** * Takes an XML object and returns the specific language name. * - * @param \wcf\util\XML $xml + * @param XML $xml * @return string language name + * @throws SystemException */ public static function readLanguageNameFromXML(XML $xml) { $rootNode = $xml->xpath()->query('/ns:language')->item(0); @@ -339,8 +341,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje /** * Takes an XML object and returns the specific country code. * - * @param \wcf\util\XML $xml + * @param XML $xml * @return string country code + * @throws SystemException */ public static function readCountryCodeFromXML(XML $xml) { $rootNode = $xml->xpath()->query('/ns:language')->item(0); diff --git a/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php b/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php index 5e82edccb5..1db0680589 100644 --- a/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php +++ b/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php @@ -57,6 +57,7 @@ class ViewableMedia extends DatabaseObjectDecorator { * * @param string $size thumbnail size * @return string + * @throws SystemException */ public function getThumbnailTag($size = '') { if (!isset(Media::getThumbnailSizes()[$size])) { diff --git a/wcfsetup/install/files/lib/data/menu/item/MenuItem.class.php b/wcfsetup/install/files/lib/data/menu/item/MenuItem.class.php index 9b69b0b70d..eb5488967d 100644 --- a/wcfsetup/install/files/lib/data/menu/item/MenuItem.class.php +++ b/wcfsetup/install/files/lib/data/menu/item/MenuItem.class.php @@ -148,6 +148,7 @@ class MenuItem extends DatabaseObject { * TODO: Comment * * @return IMenuPageHandler|null + * @throws SystemException */ protected function getMenuPageHandler() { $page = $this->getPage(); diff --git a/wcfsetup/install/files/lib/data/package/PackageAction.class.php b/wcfsetup/install/files/lib/data/package/PackageAction.class.php index 2bcfbb524e..cbe01d7c1d 100644 --- a/wcfsetup/install/files/lib/data/package/PackageAction.class.php +++ b/wcfsetup/install/files/lib/data/package/PackageAction.class.php @@ -77,7 +77,8 @@ class PackageAction extends AbstractDatabaseObjectAction { /** * Searches for purchased items in the WoltLab Plugin-Store. * - * @return array + * @return string[] + * @throws SystemException */ public function searchForPurchasedItems() { if (!RemoteFile::supportsSSL()) { diff --git a/wcfsetup/install/files/lib/data/page/Page.class.php b/wcfsetup/install/files/lib/data/page/Page.class.php index a35e913327..c56bbb6716 100644 --- a/wcfsetup/install/files/lib/data/page/Page.class.php +++ b/wcfsetup/install/files/lib/data/page/Page.class.php @@ -120,7 +120,6 @@ class Page extends DatabaseObject { * * @param integer $languageID language id or `null` if there are no localized versions * @return string[] page content data - * @throws \wcf\system\database\DatabaseException */ public function getPageContentByLanguage($languageID = null) { $conditions = new PreparedStatementConditionBuilder(); @@ -207,7 +206,7 @@ class Page extends DatabaseObject { /** * Sets the current page as landing page. * - * @throws SystemException + * @throws SystemException */ public function setAsLandingPage() { if ($this->requireObjectID) { diff --git a/wcfsetup/install/files/lib/data/sitemap/Sitemap.class.php b/wcfsetup/install/files/lib/data/sitemap/Sitemap.class.php index acb86b6e79..498eef4b8c 100644 --- a/wcfsetup/install/files/lib/data/sitemap/Sitemap.class.php +++ b/wcfsetup/install/files/lib/data/sitemap/Sitemap.class.php @@ -48,6 +48,7 @@ class Sitemap extends DatabaseObject { * Returns parsed template for current sitemap. * * @return string + * @throws SystemException */ public function getTemplate() { if ($this->sitemapObj === null) { diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index b53a11bb90..34cbd7d476 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -123,8 +123,9 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject /** * Reads the data of a style exchange format file. * - * @param \wcf\system\io\Tar $tar + * @param Tar $tar * @return array + * @throws SystemException */ public static function readStyleData(Tar $tar) { // search style.xml diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 3d95d60d4e..5d237cf103 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -68,6 +68,8 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio * Validates accessible groups. * * @param boolean $ignoreOwnUser + * @throws PermissionDeniedException + * @throws UserInputException */ protected function __validateAccessibleGroups($ignoreOwnUser = true) { if ($ignoreOwnUser) { diff --git a/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php b/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php index 9e99710860..d134de5b5e 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php @@ -274,6 +274,7 @@ class UserAvatarAction extends AbstractDatabaseObjectAction { * * @param string $filename * @return string + * @throws UserInputException */ protected function enforceDimensions($filename) { $imageData = getimagesize($filename); diff --git a/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php b/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php index dac1aa58ba..6e807890c5 100644 --- a/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php +++ b/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php @@ -122,7 +122,8 @@ class UserGroup extends DatabaseObject { * Returns unique group by given type. Only works for the default user groups. * * @param integer $type - * @return \wcf\data\user\group\UserGroup + * @return UserGroup + * @throws SystemException */ public static function getGroupByType($type) { if ($type != self::EVERYONE && $type != self::GUESTS && $type != self::USERS) { diff --git a/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php b/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php index 2b95e2932a..b325fb47e1 100644 --- a/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php +++ b/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php @@ -116,6 +116,7 @@ class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObj * * @param integer $groupID this group is added or deleted in the value * @param boolean $delete flag for group deletion + * @throws SystemException */ protected static function updateAccessibleGroups($groupID, $delete = false) { $sql = "SELECT optionID diff --git a/wcfsetup/install/files/lib/data/user/option/ViewableUserOption.class.php b/wcfsetup/install/files/lib/data/user/option/ViewableUserOption.class.php index 6de8fe56c9..49d2d46a02 100644 --- a/wcfsetup/install/files/lib/data/user/option/ViewableUserOption.class.php +++ b/wcfsetup/install/files/lib/data/user/option/ViewableUserOption.class.php @@ -63,6 +63,7 @@ class ViewableUserOption extends DatabaseObjectDecorator { * Returns the output object for current user option. * * @return \wcf\system\option\user\IUserOptionOutput + * @throws SystemException */ public function getOutputObject() { if (!isset(self::$outputObjects[$this->outputClass])) { diff --git a/wcfsetup/install/files/lib/data/user/profile/menu/item/UserProfileMenuItem.class.php b/wcfsetup/install/files/lib/data/user/profile/menu/item/UserProfileMenuItem.class.php index ae5d4cf1ad..02399a0cdc 100644 --- a/wcfsetup/install/files/lib/data/user/profile/menu/item/UserProfileMenuItem.class.php +++ b/wcfsetup/install/files/lib/data/user/profile/menu/item/UserProfileMenuItem.class.php @@ -58,6 +58,7 @@ class UserProfileMenuItem extends DatabaseObject { * Returns the content manager for this menu item. * * @return IUserProfileMenuContent + * @throws SystemException */ public function getContentManager() { if ($this->contentManager === null) { diff --git a/wcfsetup/install/files/lib/system/Callback.class.php b/wcfsetup/install/files/lib/system/Callback.class.php index 80537472aa..c47dbda0aa 100644 --- a/wcfsetup/install/files/lib/system/Callback.class.php +++ b/wcfsetup/install/files/lib/system/Callback.class.php @@ -23,6 +23,7 @@ final class Callback { * Creates new instance of Callback. * * @param callback $callback + * @throws SystemException */ public function __construct($callback) { if (!is_callable($callback)) { diff --git a/wcfsetup/install/files/lib/system/Regex.class.php b/wcfsetup/install/files/lib/system/Regex.class.php index c85485891f..8ebc8c7e04 100644 --- a/wcfsetup/install/files/lib/system/Regex.class.php +++ b/wcfsetup/install/files/lib/system/Regex.class.php @@ -133,6 +133,7 @@ final class Regex { * * @param string $regex * @param integer $modifier + * @throws SystemException */ public function __construct($regex, $modifier = self::MODIFIER_NONE) { // escape delimiter @@ -246,6 +247,7 @@ final class Regex { * @param mixed $result * @param string $method * @return mixed + * @throws SystemException */ private function checkResult($result, $method = '') { if ($result === false || $result === null) { diff --git a/wcfsetup/install/files/lib/system/SingletonFactory.class.php b/wcfsetup/install/files/lib/system/SingletonFactory.class.php index 6c57139c0f..a8afb3bb68 100644 --- a/wcfsetup/install/files/lib/system/SingletonFactory.class.php +++ b/wcfsetup/install/files/lib/system/SingletonFactory.class.php @@ -48,6 +48,7 @@ abstract class SingletonFactory { * Returns an unique instance of current child class. * * @return static + * @throws SystemException */ public static final function getInstance() { $className = get_called_class(); diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index fd504c9349..5fa4dbbbdc 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -279,6 +279,7 @@ class WCF { * @param string $message * @param string $file * @param integer $line + * @throws ErrorException */ public static final function handleError($severity, $message, $file, $line) { // this is neccessary for the shut-up operator @@ -496,9 +497,10 @@ class WCF { /** * Loads an application. * - * @param \wcf\data\application\Application $application - * @param boolean $isDependentApplication - * @return \wcf\system\application\IApplication + * @param Application $application + * @param boolean $isDependentApplication + * @return IApplication + * @throws SystemException */ protected function loadApplication(Application $application, $isDependentApplication = false) { $applicationObject = null; @@ -626,6 +628,7 @@ class WCF { * * @param string $name * @return mixed value + * @throws SystemException */ public function __get($name) { $method = 'get'.ucfirst($name); @@ -697,6 +700,7 @@ class WCF { * @param string $name * @param array $arguments * @return object + * @throws SystemException */ public static final function __callStatic($name, array $arguments) { $className = preg_replace('~^get~', '', $name); diff --git a/wcfsetup/install/files/lib/system/acl/ACLHandler.class.php b/wcfsetup/install/files/lib/system/acl/ACLHandler.class.php index 0c48124ebb..e478d395e5 100644 --- a/wcfsetup/install/files/lib/system/acl/ACLHandler.class.php +++ b/wcfsetup/install/files/lib/system/acl/ACLHandler.class.php @@ -126,6 +126,7 @@ class ACLHandler extends SingletonFactory { * * @param string $objectType * @return integer + * @throws SystemException */ public function getObjectTypeID($objectType) { if (!isset($this->availableObjectTypes[$objectType])) { diff --git a/wcfsetup/install/files/lib/system/ad/AdHandler.class.php b/wcfsetup/install/files/lib/system/ad/AdHandler.class.php index 16a773f1d7..94045a6c18 100644 --- a/wcfsetup/install/files/lib/system/ad/AdHandler.class.php +++ b/wcfsetup/install/files/lib/system/ad/AdHandler.class.php @@ -34,6 +34,7 @@ class AdHandler extends SingletonFactory { * * @param string $adLocation * @return string + * @throws SystemException */ public function getAds($adLocation) { if (!isset($this->objectTypes[$adLocation])) { diff --git a/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php b/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php index a1b2616cae..a94d5acccf 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 + * @throws SystemException */ public function __construct($objectType, $objectID, $tmpHash = '', $parentObjectID = 0) { if (!$objectID && !$tmpHash) { diff --git a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php index c08579f0f7..067df51e14 100644 --- a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php +++ b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php @@ -48,6 +48,7 @@ class BackgroundQueueHandler extends SingletonFactory { * * @param mixed $jobs Either an instance of \wcf\system\background\job\AbstractBackgroundJob or an array of these * @param int $time Earliest time to consider the job for execution. + * @throws SystemException */ public function enqueueAt($jobs, $time) { if ($time < TIME_NOW) { diff --git a/wcfsetup/install/files/lib/system/cache/builder/UserGroupPermissionCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/UserGroupPermissionCacheBuilder.class.php index 775d319020..63d5636363 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/UserGroupPermissionCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/UserGroupPermissionCacheBuilder.class.php @@ -84,8 +84,9 @@ class UserGroupPermissionCacheBuilder extends AbstractCacheBuilder { /** * Returns an object of the requested group option type. * - * @param string $type + * @param string $type * @return \wcf\system\option\user\group\IUserGroupOptionType + * @throws SystemException */ protected function getTypeObject($type) { if (!isset($this->typeObjects[$type])) { diff --git a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php index 7fbef862bb..f4b24ec83e 100644 --- a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php +++ b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php @@ -147,6 +147,7 @@ class DiskCacheSource implements ICacheSource { * @param string $cacheName * @param string $filename * @return mixed + * @throws SystemException */ protected function readCache($cacheName, $filename) { // get file contents diff --git a/wcfsetup/install/files/lib/system/category/CategoryHandler.class.php b/wcfsetup/install/files/lib/system/category/CategoryHandler.class.php index 2b4023bfd5..bddc8fe46a 100644 --- a/wcfsetup/install/files/lib/system/category/CategoryHandler.class.php +++ b/wcfsetup/install/files/lib/system/category/CategoryHandler.class.php @@ -1,5 +1,6 @@ + * @return Category[] + * @throws SystemException */ public function getChildCategories($categoryID, $objectTypeID = null) { if (!$categoryID && $objectTypeID === null) { diff --git a/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php b/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php index 7e642c0482..d19536a02d 100644 --- a/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php @@ -58,6 +58,7 @@ class CLICommandHandler { * * @param string $line * @return \wcf\system\cli\command\ICLICommand + * @throws IllegalLinkException */ public static function getCommand($line) { list($command, $parameters) = explode(' ', $line.' ', 2); @@ -72,6 +73,7 @@ class CLICommandHandler { * * @param string $line * @return string + * @throws IllegalLinkException */ public static function getCommandName($line) { list($command, $parameters) = explode(' ', $line.' ', 2); diff --git a/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php b/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php index 3c23ba312e..2418fc2108 100644 --- a/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php @@ -78,6 +78,7 @@ final class ClipboardEditorItem { * * @param string $name * @param mixed $value + * @throws SystemException */ public function addInternalData($name, $value) { if (!preg_match('~^[a-zA-Z]+$~', $name)) { @@ -96,6 +97,7 @@ final class ClipboardEditorItem { * * @param string $name * @param mixed $value + * @throws SystemException */ public function addParameter($name, $value) { if (!preg_match('~^[a-zA-Z]+$~', $name)) { @@ -113,6 +115,7 @@ final class ClipboardEditorItem { * Sets item name. * * @param string $name + * @throws SystemException */ public function setName($name) { if (!preg_match('~^[a-zA-Z0-9\.-]+$~', $name)) { diff --git a/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php b/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php index 1ee0b86303..e42061f246 100644 --- a/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php @@ -180,6 +180,7 @@ class ClipboardHandler extends SingletonFactory { * Loads a list of marked items grouped by type name. * * @param integer $objectTypeID + * @throws SystemException */ protected function loadMarkedItems($objectTypeID = null) { if ($this->markedItems === null) { @@ -290,6 +291,7 @@ class ClipboardHandler extends SingletonFactory { * @param string $page * @param integer $pageObjectID * @return array + * @throws SystemException */ public function getEditorItems($page, $pageObjectID) { $this->pageObjectID = 0; diff --git a/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php b/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php index ea2101d2b4..49c71fca29 100644 --- a/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php +++ b/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php @@ -82,6 +82,7 @@ class CommentHandler extends SingletonFactory { * * @param string $objectType * @return ICommentManager + * @throws SystemException */ public function getCommentManager($objectType) { $objectTypeID = $this->getObjectTypeID($objectType); @@ -90,7 +91,6 @@ class CommentHandler extends SingletonFactory { } return $this->getObjectType($objectTypeID)->getProcessor(); - } /** @@ -234,6 +234,7 @@ class CommentHandler extends SingletonFactory { * Enforces the censorship. * * @param string $text + * @throws UserInputException */ public static function enforceCensorship($text) { // search for censored words diff --git a/wcfsetup/install/files/lib/system/condition/ConditionHandler.class.php b/wcfsetup/install/files/lib/system/condition/ConditionHandler.class.php index a18348b001..97f3543b42 100644 --- a/wcfsetup/install/files/lib/system/condition/ConditionHandler.class.php +++ b/wcfsetup/install/files/lib/system/condition/ConditionHandler.class.php @@ -1,5 +1,6 @@ $objectIDs + * @param string $definitionName + * @param integer[] $objectIDs + * @throws SystemException */ public function deleteConditions($definitionName, array $objectIDs) { if (empty($objectIDs)) return; @@ -87,7 +89,8 @@ class ConditionHandler extends SingletonFactory { * * @param string $definitionName * @param integer $objectID - * @return array<\wcf\data\condition\Condition> + * @return Condition[] + * @throws SystemException */ public function getConditions($definitionName, $objectID) { // validate definition diff --git a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php index b6c8be1a6e..87ff2c92e1 100644 --- a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php @@ -162,8 +162,9 @@ class CronjobScheduler extends SingletonFactory { /** * Executes a cronjob. * - * @param \wcf\data\cronjob\CronjobEditor $cronjobEditor - * @param \wcf\data\cronjob\log\CronjobLogEditor $logEditor + * @param CronjobEditor $cronjobEditor + * @param CronjobLogEditor $logEditor + * @throws SystemException */ protected function executeCronjob(CronjobEditor $cronjobEditor, CronjobLogEditor $logEditor) { $className = $cronjobEditor->className; diff --git a/wcfsetup/install/files/lib/system/dashboard/DashboardHandler.class.php b/wcfsetup/install/files/lib/system/dashboard/DashboardHandler.class.php index 5cd036b6f7..1c1656abee 100644 --- a/wcfsetup/install/files/lib/system/dashboard/DashboardHandler.class.php +++ b/wcfsetup/install/files/lib/system/dashboard/DashboardHandler.class.php @@ -44,7 +44,8 @@ class DashboardHandler extends SingletonFactory { * Loads the active dashboard boxes for the given object type and page. * * @param string $objectType - * @param \wcf\page\IPage $page + * @param IPage $page + * @throws SystemException */ public function loadBoxes($objectType, IPage $page) { $objectTypeObj = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.user.dashboardContainer', $objectType); @@ -97,7 +98,8 @@ class DashboardHandler extends SingletonFactory { * all boxes will be assigned as disabled for given object type. * * @param string $objectType - * @param array $enableBoxNames + * @param string[] $enableBoxNames + * @throws SystemException */ public static function setDefaultValues($objectType, array $enableBoxNames = array()) { $objectTypeID = 0; diff --git a/wcfsetup/install/files/lib/system/database/Database.class.php b/wcfsetup/install/files/lib/system/database/Database.class.php index bd4913ca5b..cef32f6d92 100644 --- a/wcfsetup/install/files/lib/system/database/Database.class.php +++ b/wcfsetup/install/files/lib/system/database/Database.class.php @@ -121,6 +121,7 @@ abstract class Database { * @param string $table * @param string $field * @return integer + * @throws DatabaseException */ public function getInsertID($table, $field) { try { @@ -135,6 +136,7 @@ abstract class Database { * Initiates a transaction. * * @return boolean true on success + * @throws DatabaseTransactionException */ public function beginTransaction() { try { @@ -161,6 +163,7 @@ abstract class Database { * Commits a transaction and returns true if the transaction was successfull. * * @return boolean + * @throws DatabaseTransactionException */ public function commitTransaction() { if ($this->activeTransactions === 0) return false; @@ -190,6 +193,7 @@ abstract class Database { * Rolls back a transaction and returns true if the rollback was successfull. * * @return boolean + * @throws DatabaseTransactionException */ public function rollBackTransaction() { if ($this->activeTransactions === 0) return false; @@ -220,7 +224,8 @@ abstract class Database { * @param string $statement * @param integer $limit * @param integer $offset - * @return \wcf\system\database\statement\PreparedStatement + * @return PreparedStatement + * @throws DatabaseQueryException */ public function prepareStatement($statement, $limit = 0, $offset = 0) { $statement = $this->handleLimitParameter($statement, $limit, $offset); 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 487bba992c..16e6124f79 100644 --- a/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php +++ b/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php @@ -85,6 +85,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { * @param string $tableName * @param string $columnName * @return array + * @throws DatabaseException */ protected function getColumnData($tableName, $columnName) { $sql = "SELECT pg_catalog.FORMAT_TYPE(atttypid, atttypmod) AS type, attnotnull AS notNull, atthasdef AS default @@ -386,6 +387,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { * * @param string $mySQLType * @return string + * @throws DatabaseException */ protected function getColumnType($mySQLType) { switch ($mySQLType) { diff --git a/wcfsetup/install/files/lib/system/database/statement/PreparedStatement.class.php b/wcfsetup/install/files/lib/system/database/statement/PreparedStatement.class.php index 17a9e337a2..ff509b0502 100644 --- a/wcfsetup/install/files/lib/system/database/statement/PreparedStatement.class.php +++ b/wcfsetup/install/files/lib/system/database/statement/PreparedStatement.class.php @@ -61,6 +61,7 @@ class PreparedStatement { * @param string $name * @param array $arguments * @return mixed + * @throws SystemException */ public function __call($name, $arguments) { if (!method_exists($this->pdoStatement, $name)) { @@ -79,6 +80,7 @@ class PreparedStatement { * Executes a prepared statement. * * @param array $parameters + * @throws DatabaseQueryExecutionException */ public function execute(array $parameters = array()) { $this->parameters = $parameters; @@ -186,6 +188,7 @@ class PreparedStatement { * Counts number of affected rows by the last sql statement (INSERT, UPDATE or DELETE). * * @return integer number of affected rows + * @throws DatabaseQueryException */ public function getAffectedRows() { try { diff --git a/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php b/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php index c337055a5d..aa9681fd03 100644 --- a/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php +++ b/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php @@ -56,6 +56,7 @@ class SQLParser { * * @param string $statement * @param string $query + * @throws SystemException */ protected function executeStatement($statement, $query) { switch ($statement) { diff --git a/wcfsetup/install/files/lib/system/edit/EditHistoryManager.class.php b/wcfsetup/install/files/lib/system/edit/EditHistoryManager.class.php index ba240297e6..2a2cc93db0 100644 --- a/wcfsetup/install/files/lib/system/edit/EditHistoryManager.class.php +++ b/wcfsetup/install/files/lib/system/edit/EditHistoryManager.class.php @@ -36,6 +36,7 @@ class EditHistoryManager extends SingletonFactory { * * @param string $objectType * @return integer + * @throws SystemException */ public function getObjectTypeID($objectType) { if (!isset($this->availableObjectTypes[$objectType])) { diff --git a/wcfsetup/install/files/lib/system/email/Email.class.php b/wcfsetup/install/files/lib/system/email/Email.class.php index 463766867f..00b2070380 100644 --- a/wcfsetup/install/files/lib/system/email/Email.class.php +++ b/wcfsetup/install/files/lib/system/email/Email.class.php @@ -177,7 +177,8 @@ class Email { /** * Sets the part left of the at sign (@) in the email's 'Message-Id'. * - * @param string $messageID + * @param string $messageID + * @throws SystemException */ public function setMessageID($messageID = null) { if ($messageID === null) { @@ -212,7 +213,8 @@ class Email { /** * Adds a message id to the email's 'In-Reply-To'. * - * @param string $messageID + * @param string $messageID + * @throws SystemException */ public function addInReplyTo($messageID) { if (!preg_match('(^'.EmailGrammar::getGrammar('msg-id').'$)', $messageID)) { @@ -243,7 +245,8 @@ class Email { /** * Adds a message id to the email's 'References'. * - * @param string $messageID + * @param string $messageID + * @throws SystemException */ public function addReferences($messageID) { if (!preg_match('(^'.EmailGrammar::getGrammar('msg-id').'$)', $messageID)) { @@ -320,8 +323,9 @@ class Email { /** * Adds a recipient to this email. * - * @param \wcf\system\email\Mailbox $recipient - * @param string $type One of 'to', 'cc', 'bcc' + * @param Mailbox $recipient + * @param string $type One of 'to', 'cc', 'bcc' + * @throws SystemException */ public function addRecipient(Mailbox $recipient, $type = 'to') { switch ($type) { @@ -357,8 +361,9 @@ class Email { /** * Adds a custom X-* header to the email. * - * @param string $header - * @param string $value + * @param string $header + * @param string $value + * @throws SystemException */ public function addHeader($header, $value) { $header = mb_strtolower($header); @@ -375,8 +380,9 @@ class Email { * The given priority determines the ordering within the Email. A higher priority * mime part will be further down the email (see RFC 2046, 5.1.4). * - * @param \wcf\system\email\mime\AbstractMimePart $part - * @param integer $priority + * @param AbstractMimePart $part + * @param integer $priority + * @throws SystemException */ public function addMimePart(AbstractMimePart $part, $priority = 1000) { foreach ($part->getAdditionalHeaders() as $header) { @@ -430,6 +436,7 @@ class Email { * headers will fail. * * @return array + * @throws SystemException */ public function getHeaders() { $headers = [ ]; diff --git a/wcfsetup/install/files/lib/system/email/Mailbox.class.php b/wcfsetup/install/files/lib/system/email/Mailbox.class.php index 009f4d919f..61cf6bc3ca 100644 --- a/wcfsetup/install/files/lib/system/email/Mailbox.class.php +++ b/wcfsetup/install/files/lib/system/email/Mailbox.class.php @@ -31,9 +31,10 @@ class Mailbox { /** * Creates a new Mailbox. * - * @param string $address email address of this mailbox - * @param string $name human readable name of this mailbox (or null) - * @param \wcf\data\language\Language $language Language to use for localization (or null for the default language) + * @param string $address email address of this mailbox + * @param string $name human readable name of this mailbox (or null) + * @param Language $language Language to use for localization (or null for the default language) + * @throws SystemException */ public function __construct($address, $name = null, Language $language = null) { if (!preg_match('(^'.EmailGrammar::getGrammar('addr-spec').'$)', $address)) { diff --git a/wcfsetup/install/files/lib/system/email/mime/AttachmentMimePart.class.php b/wcfsetup/install/files/lib/system/email/mime/AttachmentMimePart.class.php index 7f65c95a71..acae82d59a 100644 --- a/wcfsetup/install/files/lib/system/email/mime/AttachmentMimePart.class.php +++ b/wcfsetup/install/files/lib/system/email/mime/AttachmentMimePart.class.php @@ -46,6 +46,7 @@ class AttachmentMimePart extends AbstractMimePart { * @param string $path Path to read the file from. * @param string $filename Filename to provide in the email or null to use the $path's basename. * @param string $mimeType Mime type to provide in the email or null to guess the mime type. + * @throws SystemException */ public function __construct($path, $filename = null, $mimeType = null) { if (!is_file($path) || !is_readable($path)) { diff --git a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php index 260584654b..f59f0b337b 100644 --- a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php +++ b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php @@ -83,6 +83,7 @@ class SmtpEmailTransport implements EmailTransport { * @param string $username username to use for authentication * @param string $password corresponding password * @param string $starttls one of 'none', 'may' and 'encrypt' + * @throws SystemException */ public function __construct($host = MAIL_SMTP_HOST, $port = MAIL_SMTP_PORT, $username = MAIL_SMTP_USER, $password = MAIL_SMTP_PASSWORD, $starttls = MAIL_SMTP_STARTTLS) { $this->host = $host; @@ -112,8 +113,10 @@ class SmtpEmailTransport implements EmailTransport { * Reads a server reply and validates it against the given expected status codes. * Returns a tuple [ status code, reply text ]. * - * @param array $expectedCodes + * @param integer[] $expectedCodes * @return array + * @throws PermanentFailure + * @throws TransientFailure */ protected function read(array $expectedCodes) { $code = null; @@ -306,8 +309,11 @@ class SmtpEmailTransport implements EmailTransport { /** * Delivers the given email using SMTP. * - * @param \wcf\system\email\Email $email - * @param \wcf\system\email\Mailbox $envelopeTo + * @param Email $email + * @param Mailbox $envelopeTo + * @throws \Exception + * @throws PermanentFailure + * @throws SystemException */ public function deliver(Email $email, Mailbox $envelopeTo) { // delivery is locked diff --git a/wcfsetup/install/files/lib/system/importer/ImportHandler.class.php b/wcfsetup/install/files/lib/system/importer/ImportHandler.class.php index 4b78ad1933..40de8e9665 100644 --- a/wcfsetup/install/files/lib/system/importer/ImportHandler.class.php +++ b/wcfsetup/install/files/lib/system/importer/ImportHandler.class.php @@ -63,10 +63,11 @@ class ImportHandler extends SingletonFactory implements IAJAXInvokeAction { } /** - * Gets a data importer. + * Returns a data importer. * * @param string $type - * @return \wcf\system\importer\IImporter + * @return IImporter + * @throws SystemException */ public function getImporter($type) { if (!isset($this->importers[$type])) { diff --git a/wcfsetup/install/files/lib/system/io/AtomicWriter.class.php b/wcfsetup/install/files/lib/system/io/AtomicWriter.class.php index af514101df..7939f99e99 100644 --- a/wcfsetup/install/files/lib/system/io/AtomicWriter.class.php +++ b/wcfsetup/install/files/lib/system/io/AtomicWriter.class.php @@ -37,6 +37,7 @@ class AtomicWriter extends File { * Opens a new file. The file is always opened in binary mode. * * @param string $filename + * @throws SystemException */ public function __construct($filename) { $this->targetFilename = $filename; diff --git a/wcfsetup/install/files/lib/system/io/FTP.class.php b/wcfsetup/install/files/lib/system/io/FTP.class.php index 52b0b6d53a..59e2c5f302 100644 --- a/wcfsetup/install/files/lib/system/io/FTP.class.php +++ b/wcfsetup/install/files/lib/system/io/FTP.class.php @@ -25,6 +25,7 @@ class FTP { * @param string $host * @param integer $port * @param integer $timeout + * @throws SystemException */ public function __construct($host = 'localhost', $port = 21, $timeout = 30) { $this->resource = ftp_connect($host, $port, $timeout); @@ -38,6 +39,7 @@ class FTP { * * @param string $function * @param array $arguments + * @throws SystemException */ public function __call($function, $arguments) { array_unshift($arguments, $this->resource); diff --git a/wcfsetup/install/files/lib/system/io/File.class.php b/wcfsetup/install/files/lib/system/io/File.class.php index d338b940ec..5609f79318 100644 --- a/wcfsetup/install/files/lib/system/io/File.class.php +++ b/wcfsetup/install/files/lib/system/io/File.class.php @@ -42,6 +42,7 @@ class File { * @param string $filename * @param string $mode * @param array $options + * @throws SystemException */ public function __construct($filename, $mode = 'wb', $options = array()) { $this->filename = $filename; @@ -63,6 +64,7 @@ class File { * * @param string $function * @param array $arguments + * @throws SystemException */ public function __call($function, $arguments) { if (function_exists('f' . $function)) { diff --git a/wcfsetup/install/files/lib/system/io/GZipFile.class.php b/wcfsetup/install/files/lib/system/io/GZipFile.class.php index a7e361d3cc..9af6f24f81 100644 --- a/wcfsetup/install/files/lib/system/io/GZipFile.class.php +++ b/wcfsetup/install/files/lib/system/io/GZipFile.class.php @@ -25,6 +25,7 @@ class GZipFile extends File { * * @param string $filename * @param string $mode + * @throws SystemException */ public function __construct($filename, $mode = 'wb') { if (self::$gzopen64 === null) { @@ -43,6 +44,7 @@ class GZipFile extends File { * * @param string $function * @param array $arguments + * @throws SystemException */ public function __call($function, $arguments) { if (self::$gzopen64 && function_exists('gz' . $function . '64')) { diff --git a/wcfsetup/install/files/lib/system/io/RemoteFile.class.php b/wcfsetup/install/files/lib/system/io/RemoteFile.class.php index 2477f8f717..92e34c275f 100644 --- a/wcfsetup/install/files/lib/system/io/RemoteFile.class.php +++ b/wcfsetup/install/files/lib/system/io/RemoteFile.class.php @@ -50,6 +50,7 @@ class RemoteFile extends File { * @param integer $port * @param integer $timeout * @param array $options + * @throws SystemException */ public function __construct($host, $port, $timeout = 30, $options = array()) { $this->host = $host; diff --git a/wcfsetup/install/files/lib/system/io/Tar.class.php b/wcfsetup/install/files/lib/system/io/Tar.class.php index 4953a666d7..70c5add8e0 100644 --- a/wcfsetup/install/files/lib/system/io/Tar.class.php +++ b/wcfsetup/install/files/lib/system/io/Tar.class.php @@ -75,6 +75,7 @@ class Tar implements IArchive { * archiveName must be tarball or gzipped tarball * * @param string $archiveName + * @throws SystemException */ public function __construct($archiveName) { if (!is_file($archiveName)) { diff --git a/wcfsetup/install/files/lib/system/io/TarWriter.class.php b/wcfsetup/install/files/lib/system/io/TarWriter.class.php index b95e2f7951..ac218a69d6 100644 --- a/wcfsetup/install/files/lib/system/io/TarWriter.class.php +++ b/wcfsetup/install/files/lib/system/io/TarWriter.class.php @@ -85,6 +85,7 @@ class TarWriter extends Tar { * @param string $addDir * @param string $removeDir * @return boolean result + * @throws SystemException */ public function add($files, $addDir = '', $removeDir = '') { if (!is_array($files)) $files = array($files); diff --git a/wcfsetup/install/files/lib/system/io/Zip.class.php b/wcfsetup/install/files/lib/system/io/Zip.class.php index 621ef18841..18135e0b24 100644 --- a/wcfsetup/install/files/lib/system/io/Zip.class.php +++ b/wcfsetup/install/files/lib/system/io/Zip.class.php @@ -159,12 +159,13 @@ class Zip extends File implements IArchive { * Reads the central directory and returns it. * * @return array + * @throws SystemException */ protected function readCentralDirectory() { $this->jumpToCentralDirectory(); $offset = $this->tell(); - + // check signature if ($this->read(4) !== self::CENTRAL_DIRECTORY_SIGNATURE) { throw new SystemException('Not in central directory'); @@ -221,6 +222,7 @@ class Zip extends File implements IArchive { * * @param integer $offset where to start reading * @return boolean + * @throws SystemException */ public function isFile($offset = null) { if ($offset === null) $offset = $this->tell(); @@ -240,6 +242,7 @@ class Zip extends File implements IArchive { * * @param integer $offset where to start reading * @return array + * @throws SystemException */ public function readFile($offset = null) { if ($offset === null) $offset = $this->tell(); diff --git a/wcfsetup/install/files/lib/system/label/LabelHandler.class.php b/wcfsetup/install/files/lib/system/label/LabelHandler.class.php index 2d928c89c9..d38ae2bea1 100644 --- a/wcfsetup/install/files/lib/system/label/LabelHandler.class.php +++ b/wcfsetup/install/files/lib/system/label/LabelHandler.class.php @@ -1,5 +1,6 @@ $labelIDs + * @param integer[] $labelIDs * @return array + * @throws SystemException */ public function getPermissions($optionName, array $labelIDs) { if (empty($labelIDs)) { @@ -270,10 +272,11 @@ class LabelHandler extends SingletonFactory { /** * Returns given label groups by id. * - * @param array $groupID - * @param boolean $validatePermissions - * @param string $permission - * @return array<\wcf\data\label\group\ViewableLabelGroup> + * @param integer[] $groupIDs + * @param boolean $validatePermissions + * @param string $permission + * @return ViewableLabelGroup[] + * @throws SystemException */ public function getLabelGroups(array $groupIDs = array(), $validatePermissions = true, $permission = 'canSetLabel') { $data = array(); diff --git a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php index 7e37d5c4a1..b3dcdedf02 100644 --- a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php +++ b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php @@ -170,6 +170,7 @@ class I18nHandler extends SingletonFactory { * * @param string $elementID * @param string $plainValue + * @throws SystemException */ public function setValue($elementID, $plainValue) { if (!is_string($plainValue)) { @@ -193,6 +194,7 @@ class I18nHandler extends SingletonFactory { * * @param string $elementID * @param string[] $i18nValues + * @throws SystemException */ public function setValues($elementID, array $i18nValues) { if (empty($i18nValues)) { diff --git a/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php b/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php index b4c9e3355a..565d4d5618 100644 --- a/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php +++ b/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php @@ -66,7 +66,8 @@ class LanguageServerProcessor extends SingletonFactory { * Downloads and imports a language file from a language server. * * @param string $location - * @param array $packageList + * @param string[] $packageList + * @throws SystemException */ protected function importLanguageFile($location, array $packageList) { // get proxy diff --git a/wcfsetup/install/files/lib/system/log/modification/AbstractModificationLogHandler.class.php b/wcfsetup/install/files/lib/system/log/modification/AbstractModificationLogHandler.class.php index d09c0ad257..020d567bf0 100644 --- a/wcfsetup/install/files/lib/system/log/modification/AbstractModificationLogHandler.class.php +++ b/wcfsetup/install/files/lib/system/log/modification/AbstractModificationLogHandler.class.php @@ -98,8 +98,6 @@ abstract class AbstractModificationLogHandler extends SingletonFactory { * * @param integer[] $objectIDs * @param string[] $ignoredActions names of actions whose log entries will not be deleted - * @throws DatabaseQueryException - * @throws DatabaseQueryExecutionException */ public function deleteLogs(array $objectIDs, array $ignoredActions = []) { if (empty($objectIDs)) return; @@ -121,8 +119,6 @@ abstract class AbstractModificationLogHandler extends SingletonFactory { * Deletes modification log entries by the id of the parent object. * * @param integer[] $parentObjectIDs - * @throws DatabaseQueryException - * @throws DatabaseQueryExecutionException */ public function deleteLogsByParentIDs(array $parentObjectIDs) { if (empty($parentObjectIDs)) return; diff --git a/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php b/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php index 81405903a7..70429327d7 100644 --- a/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php +++ b/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php @@ -1,5 +1,6 @@ getObjectType($objectType); @@ -94,7 +96,8 @@ class ModificationLogHandler extends SingletonFactory { * Removes log entries. * * @param string $objectType - * @param array $objectIDs + * @param integer[] $objectIDs + * @throws SystemException */ protected function _remove($objectType, array $objectIDs) { $objectTypeObj = $this->getObjectType($objectType); diff --git a/wcfsetup/install/files/lib/system/message/QuickReplyManager.class.php b/wcfsetup/install/files/lib/system/message/QuickReplyManager.class.php index 242f249b42..fff3f31b1f 100644 --- a/wcfsetup/install/files/lib/system/message/QuickReplyManager.class.php +++ b/wcfsetup/install/files/lib/system/message/QuickReplyManager.class.php @@ -104,6 +104,8 @@ class QuickReplyManager extends SingletonFactory { * @param array $parameters * @param string $containerClassName * @param string $containerDecoratorClassName + * @throws SystemException + * @throws UserInputException */ public function validateParameters(IMessageQuickReplyAction $object, array &$parameters, $containerClassName, $containerDecoratorClassName = '') { if (!isset($parameters['data']['message'])) { 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 2b0260a592..715de46720 100644 --- a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php +++ b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php @@ -103,6 +103,7 @@ class MessageQuoteManager extends SingletonFactory { * @param string $fullQuote * @param boolean $returnFalseIfExists * @return mixed + * @throws SystemException */ public function addQuote($objectType, $parentObjectID, $objectID, $message, $fullQuote = '', $returnFalseIfExists = true) { if (!isset($this->objectTypes[$objectType])) { @@ -476,6 +477,7 @@ class MessageQuoteManager extends SingletonFactory { * * @param string[] $objectTypes * @return array + * @throws SystemException */ public function getFullQuoteObjectIDs(array $objectTypes) { $objectIDs = []; @@ -506,6 +508,7 @@ class MessageQuoteManager extends SingletonFactory { * * @param string $objectType * @param integer[] $objectIDs + * @throws SystemException */ public function initObjects($objectType, array $objectIDs) { if (!isset($this->objectTypes[$objectType])) { diff --git a/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueActivationManager.class.php b/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueActivationManager.class.php index 571ea97785..5617958d42 100644 --- a/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueActivationManager.class.php +++ b/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueActivationManager.class.php @@ -53,6 +53,7 @@ class ModerationQueueActivationManager extends AbstractModerationQueueManager { * @param string $objectType * @param integer $objectID * @param array $additionalData + * @throws SystemException */ public function addModeratedContent($objectType, $objectID, array $additionalData = array()) { if (!$this->isValid($objectType)) { @@ -71,7 +72,8 @@ class ModerationQueueActivationManager extends AbstractModerationQueueManager { * Marks entries from moderation queue as done. * * @param string $objectType - * @param array $objectIDs + * @param integer[] $objectIDs + * @throws SystemException */ public function removeModeratedContent($objectType, array $objectIDs) { if (!$this->isValid($objectType)) { diff --git a/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php b/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php index 5467e9482a..d2576de55e 100644 --- a/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php +++ b/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php @@ -2,6 +2,7 @@ namespace wcf\system\moderation\queue; use wcf\data\moderation\queue\ModerationQueue; use wcf\data\moderation\queue\ModerationQueueList; +use wcf\data\moderation\queue\ViewableModerationQueue; use wcf\data\object\type\ObjectTypeCache; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\exception\SystemException; @@ -183,8 +184,9 @@ class ModerationQueueManager extends SingletonFactory { /** * Populates object properties for viewing. * - * @param integer $objectTypeID - * @param array<\wcf\data\moderation\queue\ViewableModerationQueue> $objects + * @param integer $objectTypeID + * @param ViewableModerationQueue[] $objects + * @throws SystemException */ public function populate($objectTypeID, array $objects) { $moderationType = ''; @@ -439,8 +441,9 @@ class ModerationQueueManager extends SingletonFactory { /** * Removes moderation queues, should only be called if related objects are permanently deleted. * - * @param string $objectType - * @param array $objectIDs + * @param string $objectType + * @param integer[] $objectIDs + * @throws SystemException */ public function removeQueues($objectType, array $objectIDs) { $definitionNames = $this->getDefinitionNamesByObjectType($objectType); diff --git a/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueReportManager.class.php b/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueReportManager.class.php index 5d8418cbb0..3e706f8a35 100644 --- a/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueReportManager.class.php +++ b/wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueReportManager.class.php @@ -119,6 +119,7 @@ class ModerationQueueReportManager extends AbstractModerationQueueManager { * @param integer $objectID * @param string $message * @param array $additionalData + * @throws SystemException */ public function addReport($objectType, $objectID, $message, array $additionalData = array()) { if (!$this->isValid($objectType)) { diff --git a/wcfsetup/install/files/lib/system/option/OptionHandler.class.php b/wcfsetup/install/files/lib/system/option/OptionHandler.class.php index ca1538c3d9..8092ef94d4 100644 --- a/wcfsetup/install/files/lib/system/option/OptionHandler.class.php +++ b/wcfsetup/install/files/lib/system/option/OptionHandler.class.php @@ -286,7 +286,8 @@ class OptionHandler implements IOptionHandler { /** * Validates an option. * - * @param \wcf\data\option\Option $option + * @param Option $option + * @throws UserInputException */ protected function validateOption(Option $option) { // get type object @@ -320,7 +321,8 @@ class OptionHandler implements IOptionHandler { * Returns an object of the requested option type. * * @param string $type - * @return \wcf\system\option\IOptionType + * @return IOptionType + * @throws SystemException */ public function getTypeObject($type) { if (!isset($this->typeObjects[$type])) { @@ -341,6 +343,7 @@ class OptionHandler implements IOptionHandler { * * @param string $optionType * @return string + * @throws SystemException */ protected function getClassName($optionType) { $optionType = StringUtil::firstCharToUpperCase($optionType); diff --git a/wcfsetup/install/files/lib/system/package/PackageArchive.class.php b/wcfsetup/install/files/lib/system/package/PackageArchive.class.php index 91d824a095..4a5aa01cb6 100644 --- a/wcfsetup/install/files/lib/system/package/PackageArchive.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageArchive.class.php @@ -741,6 +741,7 @@ class PackageArchive { * @param string $filename * @param string $tempPrefix * @return string + * @throws PackageValidationException */ public function extractTar($filename, $tempPrefix = 'package_') { // search the requested tar archive in our package archive. diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index e8181f7baa..81da8cb6dc 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -306,6 +306,7 @@ class PackageInstallationDispatcher { * * @param mixed[] $nodeData * @return PackageInstallationStep + * @throws SystemException */ protected function installPackage(array $nodeData) { $installationStep = new PackageInstallationStep(); @@ -532,8 +533,9 @@ class PackageInstallationDispatcher { /** * Executes a package installation plugin. * - * @param mixed[] $nodeData + * @param mixed[] $nodeData * @return boolean + * @throws SystemException */ protected function executePIP(array $nodeData) { $step = new PackageInstallationStep(); diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php index a53893f5b2..398d903048 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php @@ -436,6 +436,7 @@ class PackageInstallationNodeBuilder { * Builds nodes for required packages, whereas each has it own node. * * @return string + * @throws SystemException */ protected function buildRequirementNodes() { $queue = $this->installation->queue; diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php index 5add17dd68..0ee8d966cc 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php @@ -209,6 +209,8 @@ class PackageInstallationScheduler { * @param array $packageUpdateVersions package update versions * @param boolean $validateInstallInstructions * @return string tmp filename of a downloaded package + * @throws PackageUpdateUnauthorizedException + * @throws SystemException */ protected function downloadPackage($package, $packageUpdateVersions, $validateInstallInstructions = false) { // get download from cache @@ -551,6 +553,7 @@ class PackageInstallationScheduler { * @param string $currentVersion current package version * @param string $newVersion new package version * @return array list of update steps (old version => new version, old version => new version, ...) + * @throws SystemException */ protected function findShortestUpdateThread($package, $fromversions, $currentVersion, $newVersion) { if (!isset($fromversions[$newVersion])) { diff --git a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php index e7b7c94289..cd24f6285b 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php @@ -88,8 +88,10 @@ class PackageUpdateDispatcher extends SingletonFactory { /** * Gets the package_update.xml from an update server. * - * @param \wcf\data\package\update\server\PackageUpdateServer $updateServer - * @param boolean $forceHTTP + * @param PackageUpdateServer $updateServer + * @param boolean $forceHTTP + * @throws PackageUpdateUnauthorizedException + * @throws SystemException */ protected function getPackageUpdateXML(PackageUpdateServer $updateServer, $forceHTTP = false) { $settings = array(); @@ -195,7 +197,8 @@ class PackageUpdateDispatcher extends SingletonFactory { * Parses a stream containing info from a packages_update.xml. * * @param string $content - * @return array $allNewPackages + * @return array + * @throws SystemException */ protected function parsePackageUpdateXML($content) { // load xml document @@ -660,6 +663,7 @@ class PackageUpdateDispatcher extends SingletonFactory { * @param string $package package identifier * @param string $version package version * @return array package update versions + * @throws SystemException */ public function getPackageUpdateVersions($package, $version = '') { // get newest package version diff --git a/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php index 62a91ce43b..49dbd4b003 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php @@ -90,6 +90,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * Imports options. * * @param \DOMXPath $xpath + * @throws SystemException */ protected function importOptions(\DOMXPath $xpath) { $elements = $xpath->query('/ns:data/ns:import/ns:options/ns:option'); @@ -176,6 +177,7 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati * * @param string $optionType * @return integer + * @throws SystemException */ protected function getObjectTypeID($optionType) { if (!isset($this->optionTypeIDs[$optionType])) { diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php index 3c94d1de2a..4604fd7fd5 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php @@ -99,6 +99,7 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag * Imports option categories. * * @param \DOMXPath $xpath + * @throws SystemException */ protected function importCategories(\DOMXPath $xpath) { $elements = $xpath->query('/ns:data/ns:import/ns:categories/ns:category'); @@ -147,6 +148,7 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag * Imports options. * * @param \DOMXPath $xpath + * @throws SystemException */ protected function importOptions(\DOMXPath $xpath) { $elements = $xpath->query('/ns:data/ns:import/ns:options/ns:option'); @@ -201,6 +203,7 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag * Installs option categories. * * @param array $category + * @throws SystemException */ protected function saveCategory($category) { // search existing category diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php index 2f8d820705..2555aed7a5 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php @@ -326,6 +326,7 @@ abstract class AbstractXMLPackageInstallationPlugin extends AbstractPackageInsta * * @param string $filename * @return XML $xml + * @throws SystemException */ protected function getXML($filename = '') { if (empty($filename)) { diff --git a/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php index 609b7fba32..b8950e513f 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php @@ -181,7 +181,8 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl * was not found, an exception message is thrown. * * @param string $filename - * @return \wcf\util\XML + * @return XML + * @throws SystemException */ protected function readLanguage($filename) { // search language files in package archive diff --git a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php index c97a8798ae..17280b6e08 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php @@ -35,6 +35,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation * * @param string $definitionName * @return integer + * @throws SystemException */ protected function getDefinitionID($definitionName) { // get object type id diff --git a/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php index 5c4f2b9a09..a1d717b3bc 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php @@ -141,6 +141,7 @@ class SQLPackageInstallationPlugin extends AbstractPackageInstallationPlugin { * * @param string $filename * @return string + * @throws SystemException */ protected function getSQL($filename) { // search sql files in package archive 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 c1fcda44b0..f3653dcaf8 100644 --- a/wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php +++ b/wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php @@ -185,6 +185,7 @@ class PackageValidationArchive implements \RecursiveIterator { * * @param string $requiredVersion * @param integer $validationMode + * @throws PackageValidationException */ protected function validateInstructions($requiredVersion, $validationMode) { $package = $this->getPackage(); @@ -230,6 +231,7 @@ class PackageValidationArchive implements \RecursiveIterator { * * @param string $type * @param array $instructions + * @throws PackageValidationException */ protected function validatePackageInstallationPlugins($type, array $instructions) { for ($i = 0, $length = count($instructions); $i < $length; $i++) { @@ -248,6 +250,7 @@ class PackageValidationArchive implements \RecursiveIterator { * Validates if an installed package excludes the current package and vice versa. * * @param string $package + * @throws PackageValidationException */ protected function validateExclusion($package) { $packageVersion = $this->archive->getPackageInfo('version'); diff --git a/wcfsetup/install/files/lib/system/page/PageManager.class.php b/wcfsetup/install/files/lib/system/page/PageManager.class.php index e118bd8aca..293d81bf87 100644 --- a/wcfsetup/install/files/lib/system/page/PageManager.class.php +++ b/wcfsetup/install/files/lib/system/page/PageManager.class.php @@ -45,7 +45,8 @@ class PageManager extends SingletonFactory { * are returned. * * @param string $application - * @return array + * @return string[] + * @throws SystemException */ public function getSelection($application = null) { $objectTypes = $this->objectTypes; diff --git a/wcfsetup/install/files/lib/system/poll/PollManager.class.php b/wcfsetup/install/files/lib/system/poll/PollManager.class.php index 374208c342..5d0dac103a 100644 --- a/wcfsetup/install/files/lib/system/poll/PollManager.class.php +++ b/wcfsetup/install/files/lib/system/poll/PollManager.class.php @@ -105,6 +105,7 @@ class PollManager extends SingletonFactory { * @param integer $objectID * @param integer $pollID * @return boolean + * @throws SystemException */ public function setObject($objectType, $objectID, $pollID = 0) { if (!isset($this->cache[$objectType])) { @@ -236,6 +237,7 @@ class PollManager extends SingletonFactory { * * @param integer $objectID * @return integer + * @throws SystemException */ public function save($objectID = null) { if ($objectID !== null) { @@ -396,6 +398,7 @@ class PollManager extends SingletonFactory { * @param integer $objectTypeID * @param string $objectType * @return mixed + * @throws SystemException */ protected function getHandler($objectTypeID, $objectType = '') { if ($objectTypeID !== null) { diff --git a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php index ca4bdf8209..12fdf79854 100644 --- a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php +++ b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php @@ -79,6 +79,8 @@ class RecaptchaHandler extends SingletonFactory { * * @param string $challenge * @param string $response + * @throws SystemException + * @throws UserInputException */ public function validate($challenge, $response) { // fail if challenge or response are empty to avoid sending api requests diff --git a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandlerV2.class.php b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandlerV2.class.php index f73706f227..20062d2acc 100644 --- a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandlerV2.class.php +++ b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandlerV2.class.php @@ -22,6 +22,7 @@ class RecaptchaHandlerV2 extends SingletonFactory { * Validates response. * * @param string $response + * @throws UserInputException */ public function validate($response) { // fail if response is empty to avoid sending api requests diff --git a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php index 9cc705ef20..dca618a7f3 100644 --- a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php +++ b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php @@ -189,6 +189,7 @@ class ControllerMap extends SingletonFactory { * * @param string $application application identifier * @return null|string[] default controller + * @throws SystemException */ public function lookupDefaultController($application) { $controller = $this->landingPages[$application][1]; diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index c6bc115f5b..2e9aa4aef2 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -210,7 +210,6 @@ class LinkHandler extends SingletonFactory { * @param integer $pageID page id * @param integer $languageID language id, optional * @return string full URL of empty string if `$pageID` is invalid - * @throws \wcf\system\exception\SystemException * @since 2.2 */ public function getCmsLink($pageID, $languageID = -1) { diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index aa03efa7a9..199a5d4e63 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -208,6 +208,7 @@ class RequestHandler extends SingletonFactory { * * @param string $application * @param string[] $routeData + * @throws IllegalLinkException */ protected function handleDefaultController($application, array &$routeData) { if (!RouteHandler::getInstance()->isDefaultController()) { diff --git a/wcfsetup/install/files/lib/system/request/Route.class.php b/wcfsetup/install/files/lib/system/request/Route.class.php index 3e5eccc35d..936a664243 100644 --- a/wcfsetup/install/files/lib/system/request/Route.class.php +++ b/wcfsetup/install/files/lib/system/request/Route.class.php @@ -82,6 +82,7 @@ class Route implements IRoute { * * @param string $routeSchema * @param string $controller + * @throws SystemException */ public function setSchema($routeSchema, $controller = null) { $schemaParts = $this->getParts($routeSchema); diff --git a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php index 6cebe71e3a..f152e717ee 100644 --- a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php +++ b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php @@ -1,5 +1,6 @@ availableObjectTypes[$objectType])) { @@ -61,7 +63,8 @@ class SearchIndexManager extends SingletonFactory implements ISearchIndexManager * Returns the the object type with the given name. * * @param string $objectType - * @return \wcf\data\object\type\ObjectType + * @return ObjectType + * @throws SystemException */ public function getObjectType($objectType) { if (!isset($this->availableObjectTypes[$objectType])) { diff --git a/wcfsetup/install/files/lib/system/search/acp/ACPSearchHandler.class.php b/wcfsetup/install/files/lib/system/search/acp/ACPSearchHandler.class.php index 0a9c30861c..04d4102fdc 100644 --- a/wcfsetup/install/files/lib/system/search/acp/ACPSearchHandler.class.php +++ b/wcfsetup/install/files/lib/system/search/acp/ACPSearchHandler.class.php @@ -40,7 +40,8 @@ class ACPSearchHandler extends SingletonFactory { * * @param string $query * @param integer $limit - * @return array<\wcf\system\search\acp\ACPSearchResultList> + * @return ACPSearchResultList[] + * @throws SystemException */ public function search($query, $limit = 10) { $data = array(); diff --git a/wcfsetup/install/files/lib/system/search/acp/AbstractCategorizedACPSearchResultProvider.class.php b/wcfsetup/install/files/lib/system/search/acp/AbstractCategorizedACPSearchResultProvider.class.php index e37341b15c..15cf56d5b5 100644 --- a/wcfsetup/install/files/lib/system/search/acp/AbstractCategorizedACPSearchResultProvider.class.php +++ b/wcfsetup/install/files/lib/system/search/acp/AbstractCategorizedACPSearchResultProvider.class.php @@ -67,6 +67,7 @@ abstract class AbstractCategorizedACPSearchResultProvider extends AbstractACPSea * * @param string $categoryName * @return \wcf\data\DatabaseObject + * @throws SystemException */ protected function getTopCategory($categoryName) { if (!$this->isValid($categoryName)) { diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 7dfc1c57ae..bf859b36d9 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -717,7 +717,8 @@ class SessionHandler extends SingletonFactory { /** * Changes the user stored in the session. * - * @param \wcf\data\user\User $user + * @param User $user + * @throws DatabaseException */ protected function changeUserVirtual(User $user) { /** @var \wcf\data\DatabaseObjectEditor $sessionEditor */ diff --git a/wcfsetup/install/files/lib/system/setup/Installer.class.php b/wcfsetup/install/files/lib/system/setup/Installer.class.php index 261110555b..1a48c3d6b6 100644 --- a/wcfsetup/install/files/lib/system/setup/Installer.class.php +++ b/wcfsetup/install/files/lib/system/setup/Installer.class.php @@ -74,6 +74,7 @@ class Installer { * Creates a directory in the target directory. * * @param string $dir + * @throws SystemException */ protected function createDir($dir) { if (!@is_dir($this->targetDir.$dir)) { diff --git a/wcfsetup/install/files/lib/system/sitemap/SitemapHandler.class.php b/wcfsetup/install/files/lib/system/sitemap/SitemapHandler.class.php index 0b72bc0399..7cc1d121c3 100644 --- a/wcfsetup/install/files/lib/system/sitemap/SitemapHandler.class.php +++ b/wcfsetup/install/files/lib/system/sitemap/SitemapHandler.class.php @@ -84,6 +84,7 @@ class SitemapHandler extends SingletonFactory { * Validates sitemap name. * * @param string $sitemapName + * @throws SystemException */ public function validateSitemapName($sitemapName) { if (empty($sitemapName)) { diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index b3aafc78d7..e319f69951 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -264,6 +264,7 @@ class StyleCompiler extends SingletonFactory { * * @param string $filename * @return string + * @throws SystemException */ protected function prepareFile($filename) { if (!file_exists($filename) || !is_readable($filename)) { @@ -284,6 +285,7 @@ class StyleCompiler extends SingletonFactory { * @param string[] $variables * @param string $individualScss * @param Callback $callback + * @throws SystemException */ protected function compileStylesheet($filename, array $files, array $variables, $individualScss, Callback $callback) { foreach ($variables as &$value) { diff --git a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php index 031112f599..346733bd34 100644 --- a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php @@ -83,6 +83,7 @@ class StyleHandler extends SingletonFactory { * * @param integer $styleID * @param boolean $ignorePermissions + * @throws SystemException */ public function changeStyle($styleID = 0, $ignorePermissions = false) { // check permission diff --git a/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php b/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php index cb63fe11f9..e530a737b6 100644 --- a/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php +++ b/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php @@ -190,6 +190,7 @@ class TagEngine extends SingletonFactory { * * @param string $objectType * @return integer + * @throws SystemException */ public function getObjectTypeID($objectType) { // get object type diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index 1b4b0eddea..c5ff59128f 100755 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -334,6 +334,7 @@ class TemplateEngine extends SingletonFactory { * @param string $templateName * @param string $application * @return string $path + * @throws SystemException */ public function getSourceFilename($templateName, $application) { $sourceFilename = $this->getPath($this->templatePaths[$application], $templateName); @@ -478,7 +479,8 @@ class TemplateEngine extends SingletonFactory { * Reads the content of a template file. * * @param string $sourceFilename - * @return string $sourceContent + * @return string + * @throws SystemException */ public function getSourceContent($sourceFilename) { $sourceContent = ''; @@ -652,6 +654,7 @@ class TemplateEngine extends SingletonFactory { * Sets the dir for the compiled templates. * * @param string $compileDir + * @throws SystemException */ public function setCompileDir($compileDir) { if (!is_dir($compileDir)) { diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 7644add1e9..18d1c9c59a 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -196,6 +196,7 @@ class TemplateScriptingCompiler { * @param array $metaData * @param boolean $isolated * @return string + * @throws SystemException */ public function compileString($identifier, $sourceContent, array $metaData = array(), $isolated = false) { if ($isolated) { @@ -301,6 +302,7 @@ class TemplateScriptingCompiler { * @param string $identifier * @param array $metaData * @return string + * @throws SystemException */ protected function compileTag($tag, $identifier, array &$metaData) { if (preg_match('~^'.$this->outputPattern.'~s', $tag)) { @@ -455,6 +457,7 @@ class TemplateScriptingCompiler { * @param string $tagCommand * @param string $tagArgs * @return mixed + * @throws SystemException */ protected function compileBlockPlugin($tagCommand, $tagArgs) { // check wheater this is the start ({block}) or the @@ -502,6 +505,7 @@ class TemplateScriptingCompiler { * @param string $tagCommand * @param string $tagArgs * @return mixed + * @throws SystemException */ protected function compileCompilerPlugin($tagCommand, $tagArgs) { // check wheater this is the start ({block}) or the @@ -584,6 +588,7 @@ class TemplateScriptingCompiler { * * @param string $sectionTag * @return string + * @throws SystemException */ protected function compileSectionTag($sectionTag) { $args = $this->parseTagArgs($sectionTag, 'section'); @@ -658,6 +663,7 @@ class TemplateScriptingCompiler { * * @param string $foreachTag * @return string + * @throws SystemException */ protected function compileForeachTag($foreachTag) { $args = $this->parseTagArgs($foreachTag, 'foreach'); @@ -707,6 +713,7 @@ class TemplateScriptingCompiler { * @param string $identifier * @param array $metaData * @return string + * @throws SystemException */ protected function compileIncludeTag($includeTag, $identifier, array $metaData) { $args = $this->parseTagArgs($includeTag, 'include'); @@ -847,6 +854,7 @@ class TemplateScriptingCompiler { * @param string $tagArgs * @param string $tag * @return array + * @throws SystemException */ public function parseTagArgs($tagArgs, $tag) { // replace strings @@ -930,6 +938,7 @@ class TemplateScriptingCompiler { * @param string $tagArgs * @param boolean $elseif true, if this tag is an else tag * @return string + * @throws SystemException */ protected function compileIfTag($tagArgs, $elseif = false) { $tagArgs = $this->replaceQuotes($tagArgs); @@ -1023,6 +1032,7 @@ class TemplateScriptingCompiler { * * @param string $tag * @return string + * @throws SystemException */ protected function compileOutputTag($tag) { $encodeHTML = false; @@ -1116,6 +1126,7 @@ class TemplateScriptingCompiler { * * @param string $tag * @return string + * @throws SystemException */ public function compileVariableTag($tag, $replaceQuotes = true) { // replace all quotes with unique hash values @@ -1462,6 +1473,7 @@ class TemplateScriptingCompiler { * @param string $templateName * @param string $string * @return string + * @throws SystemException */ public function applyPrefilters($templateName, $string) { foreach ($this->template->getPrefilters() as $prefilter) { diff --git a/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php b/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php index ba57970b8c..0083a84275 100644 --- a/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php +++ b/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php @@ -61,6 +61,7 @@ class DefaultUploadFileSaveStrategy implements IUploadFileSaveStrategy { * @param string $actionClassName * @param array $options * @param array $data + * @throws SystemException */ public function __construct($actionClassName, array $options = [ ], array $data = [ ]) { $this->actionClassName = $actionClassName; diff --git a/wcfsetup/install/files/lib/system/user/activity/event/UserActivityEventHandler.class.php b/wcfsetup/install/files/lib/system/user/activity/event/UserActivityEventHandler.class.php index 108db635dd..b5175acc20 100644 --- a/wcfsetup/install/files/lib/system/user/activity/event/UserActivityEventHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/activity/event/UserActivityEventHandler.class.php @@ -75,6 +75,7 @@ class UserActivityEventHandler extends SingletonFactory { * @param integer $time * @param array $additionalData * @return \wcf\data\user\activity\event\UserActivityEvent + * @throws SystemException */ public function fireEvent($objectType, $objectID, $languageID = null, $userID = null, $time = TIME_NOW, $additionalData = array()) { $objectTypeID = $this->getObjectTypeID($objectType); @@ -103,7 +104,8 @@ class UserActivityEventHandler extends SingletonFactory { * Removes activity events. * * @param string $objectType - * @param array $objectIDs + * @param integer[] $objectIDs + * @throws SystemException */ public function removeEvents($objectType, array $objectIDs) { if (empty($objectIDs)) return; diff --git a/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php b/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php index 3d0da359c0..f8cb68c389 100644 --- a/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php @@ -49,6 +49,7 @@ class UserActivityPointHandler extends SingletonFactory { * @param integer $objectID * @param integer $userID * @param array $additionalData + * @throws SystemException */ public function fireEvent($objectType, $objectID, $userID = null, array $additionalData = array()) { $objectTypeObj = $this->getObjectTypeByName($objectType); @@ -98,9 +99,10 @@ class UserActivityPointHandler extends SingletonFactory { * userID => countOfItems * ) * - * @param string $objectType - * @param array $itemsToUser - * @param boolean $updateUsers + * @param string $objectType + * @param integer[] $itemsToUser + * @param boolean $updateUsers + * @throws SystemException */ public function fireEvents($objectType, array $itemsToUser, $updateUsers = true) { $objectTypeObj = $this->getObjectTypeByName($objectType); @@ -149,7 +151,8 @@ class UserActivityPointHandler extends SingletonFactory { * Removes activity point events. * * @param string $objectType - * @param array $userToItems + * @param integer[] $userToItems + * @throws SystemException */ public function removeEvents($objectType, array $userToItems) { if (empty($userToItems)) return; @@ -210,6 +213,7 @@ class UserActivityPointHandler extends SingletonFactory { * Resets activity points and items for a given object type. * * @param string $objectType + * @throws SystemException */ public function reset($objectType) { // get and validate object type diff --git a/wcfsetup/install/files/lib/system/user/collapsible/content/UserCollapsibleContentHandler.class.php b/wcfsetup/install/files/lib/system/user/collapsible/content/UserCollapsibleContentHandler.class.php index d91d64c774..966eba36b2 100644 --- a/wcfsetup/install/files/lib/system/user/collapsible/content/UserCollapsibleContentHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/collapsible/content/UserCollapsibleContentHandler.class.php @@ -52,6 +52,7 @@ class UserCollapsibleContentHandler extends SingletonFactory { * @param string $objectType * @param string $objectID * @return boolean + * @throws SystemException */ public function isCollapsed($objectType, $objectID) { $objectTypeID = $this->getObjectTypeID($objectType); @@ -255,6 +256,7 @@ class UserCollapsibleContentHandler extends SingletonFactory { * * @param string $objectType * @param integer $objectID + * @throws SystemException */ public function resetAll($objectType, $objectID = null) { $objectTypeID = $this->getObjectTypeID($objectType); diff --git a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php index 04813f065f..b108d6813f 100644 --- a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php @@ -72,12 +72,13 @@ class UserNotificationHandler extends SingletonFactory { /** * Triggers a notification event. * - * @param string $eventName - * @param string $objectType - * @param \wcf\system\user\notification\object\IUserNotificationObject $notificationObject - * @param array $recipientIDs - * @param array $additionalData - * @param integer $baseObjectID + * @param string $eventName + * @param string $objectType + * @param IUserNotificationObject $notificationObject + * @param integer[] $recipientIDs + * @param array $additionalData + * @param integer $baseObjectID + * @throws SystemException */ public function fireEvent($eventName, $objectType, IUserNotificationObject $notificationObject, array $recipientIDs, array $additionalData = array(), $baseObjectID = 0) { // check given object type and event name @@ -552,6 +553,7 @@ class UserNotificationHandler extends SingletonFactory { * @param integer $authorID * @param integer $time * @return integer + * @throws SystemException */ public function getNotificationID($eventID, $objectID, $authorID = null, $time = null) { if ($authorID === null && $time === null) { @@ -686,7 +688,8 @@ class UserNotificationHandler extends SingletonFactory { * Removes notifications, this method should only be invoked for delete objects. * * @param string $objectType - * @param array $objectIDs + * @param integer[] $objectIDs + * @throws SystemException */ public function removeNotifications($objectType, array $objectIDs) { // check given object type @@ -743,8 +746,9 @@ class UserNotificationHandler extends SingletonFactory { * * @param string $eventName * @param string $objectType - * @param array $recipientIDs - * @param array $objectIDs + * @param integer[] $recipientIDs + * @param integer[] $objectIDs + * @throws SystemException */ public function markAsConfirmed($eventName, $objectType, array $recipientIDs, array $objectIDs = array()) { // check given object type and event name diff --git a/wcfsetup/install/files/lib/system/user/object/watch/UserObjectWatchHandler.class.php b/wcfsetup/install/files/lib/system/user/object/watch/UserObjectWatchHandler.class.php index b2001506f2..35ba2b8b51 100644 --- a/wcfsetup/install/files/lib/system/user/object/watch/UserObjectWatchHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/object/watch/UserObjectWatchHandler.class.php @@ -24,6 +24,7 @@ class UserObjectWatchHandler extends SingletonFactory { * * @param string $objectTypeName * @return integer + * @throws SystemException */ public function getObjectTypeID($objectTypeName) { $objectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.user.objectWatch', $objectTypeName); diff --git a/wcfsetup/install/files/lib/system/visitTracker/VisitTracker.class.php b/wcfsetup/install/files/lib/system/visitTracker/VisitTracker.class.php index be8255055b..7c1a9a2c5f 100644 --- a/wcfsetup/install/files/lib/system/visitTracker/VisitTracker.class.php +++ b/wcfsetup/install/files/lib/system/visitTracker/VisitTracker.class.php @@ -48,6 +48,7 @@ class VisitTracker extends SingletonFactory { * * @param string $objectType * @return integer + * @throws SystemException */ public function getObjectTypeID($objectType) { if (!isset($this->availableObjectTypes[$objectType])) { diff --git a/wcfsetup/install/files/lib/util/ArrayUtil.class.php b/wcfsetup/install/files/lib/util/ArrayUtil.class.php index e58216e918..81e2fbd281 100644 --- a/wcfsetup/install/files/lib/util/ArrayUtil.class.php +++ b/wcfsetup/install/files/lib/util/ArrayUtil.class.php @@ -185,8 +185,9 @@ final class ArrayUtil { * @param string $method * @param array $array1 * @param array $array2 - * @param callable $callback + * @param Callback $callback * @return boolean + * @throws SystemException */ protected static function compareHelper($method, array $array1, array $array2, Callback $callback = null) { // get function name diff --git a/wcfsetup/install/files/lib/util/ClassUtil.class.php b/wcfsetup/install/files/lib/util/ClassUtil.class.php index 66992bb50c..c4fffddcfb 100644 --- a/wcfsetup/install/files/lib/util/ClassUtil.class.php +++ b/wcfsetup/install/files/lib/util/ClassUtil.class.php @@ -34,6 +34,7 @@ final class ClassUtil { * @param string $className * @param string $targetClass * @return boolean + * @throws SystemException * * @deprecated use is_subclass_of() instead */ diff --git a/wcfsetup/install/files/lib/util/CronjobUtil.class.php b/wcfsetup/install/files/lib/util/CronjobUtil.class.php index 3aba8619c8..056c497ff9 100644 --- a/wcfsetup/install/files/lib/util/CronjobUtil.class.php +++ b/wcfsetup/install/files/lib/util/CronjobUtil.class.php @@ -494,6 +494,7 @@ final class CronjobUtil { * * @param string $name * @param string $value + * @throws SystemException */ protected static function validateAttribute($name, $value) { if ($value === '') { diff --git a/wcfsetup/install/files/lib/util/CryptoUtil.class.php b/wcfsetup/install/files/lib/util/CryptoUtil.class.php index f59c8219f8..b19c074291 100644 --- a/wcfsetup/install/files/lib/util/CryptoUtil.class.php +++ b/wcfsetup/install/files/lib/util/CryptoUtil.class.php @@ -21,8 +21,9 @@ final class CryptoUtil { /** * Signs the given value with the signature secret. * - * @param string $value + * @param string $value * @return string + * @throws CryptoException */ public static function getSignature($value) { if (mb_strlen(SIGNATURE_SECRET, '8bit') < 15) throw new CryptoException('SIGNATURE_SECRET is too short, aborting.'); @@ -110,6 +111,7 @@ final class CryptoUtil { * * @param int $n * @return string + * @throws CryptoException */ public static function randomBytes($n) { try { diff --git a/wcfsetup/install/files/lib/util/DateUtil.class.php b/wcfsetup/install/files/lib/util/DateUtil.class.php index c22dc118e0..b907f57373 100644 --- a/wcfsetup/install/files/lib/util/DateUtil.class.php +++ b/wcfsetup/install/files/lib/util/DateUtil.class.php @@ -374,6 +374,7 @@ final class DateUtil { * Validates if given date is valid ISO-8601. * * @param string $date + * @throws SystemException */ public static function validateDate($date) { if (preg_match('~^(?P[0-9]{4})-(?P[0-9]{2})-(?P[0-9]{2})~', $date, $matches)) { diff --git a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php index deafb86235..d0b718e29e 100644 --- a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php +++ b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php @@ -91,6 +91,7 @@ final class DirectoryUtil { * @param string $tmpDirectory path * @param boolean $recursive walk through sub-directories too * @return DirectoryUtil + * @throws SystemException */ public static function getInstance($tmpDirectory, $recursive = true) { $directory = realpath(FileUtil::unifyDirSeparator($tmpDirectory)); @@ -117,10 +118,11 @@ final class DirectoryUtil { /** * Returns a sorted list of files. * - * @param integer $order sort-order - * @param \wcf\system\Regex $pattern pattern to match - * @param boolean $negativeMatch true if the pattern should be inversed - * @return array + * @param integer $order sort-order + * @param Regex $pattern pattern to match + * @param boolean $negativeMatch true if the pattern should be inversed + * @return string[] + * @throws SystemException */ public function getFiles($order = SORT_ASC, Regex $pattern = null, $negativeMatch = false) { // scan the folder @@ -153,10 +155,11 @@ final class DirectoryUtil { /** * Returns a sorted list of files, with DirectoryIterator object as value * - * @param integer $order sort order - * @param \wcf\system\Regex $pattern pattern to match - * @param boolean $negativeMatch should the pattern be inversed - * @return array<\DirectoryIterator> + * @param integer $order sort order + * @param Regex $pattern pattern to match + * @param boolean $negativeMatch should the pattern be inversed + * @return \DirectoryIterator[] + * @throws SystemException */ public function getFileObjects($order = SORT_ASC, Regex $pattern = null, $negativeMatch = false) { // scan the folder @@ -277,8 +280,9 @@ final class DirectoryUtil { /** * Removes all files that match the given pattern. * - * @param \wcf\system\Regex $pattern pattern to match - * @param boolean $negativeMatch should the pattern be inversed + * @param Regex $pattern pattern to match + * @param boolean $negativeMatch should the pattern be inversed + * @throws SystemException */ public function removePattern(Regex $pattern, $negativeMatch = false) { if (!$this->recursive) throw new SystemException('Removing of files only works in recursive mode'); @@ -305,6 +309,7 @@ final class DirectoryUtil { * Calculates the size of the directory. * * @return integer directory size in bytes + * @throws SystemException */ public function getSize() { if (!$this->recursive) throw new SystemException('Calculating of size only works in recursive mode'); diff --git a/wcfsetup/install/files/lib/util/FileReader.class.php b/wcfsetup/install/files/lib/util/FileReader.class.php index 353143b71b..de8e1fa834 100644 --- a/wcfsetup/install/files/lib/util/FileReader.class.php +++ b/wcfsetup/install/files/lib/util/FileReader.class.php @@ -59,6 +59,7 @@ class FileReader { * * @param string $location * @param array $options + * @throws SystemException */ public function __construct($location, array $options) { $this->location = $location; diff --git a/wcfsetup/install/files/lib/util/FileUtil.class.php b/wcfsetup/install/files/lib/util/FileUtil.class.php index 8483717fbb..3c91a9b18f 100644 --- a/wcfsetup/install/files/lib/util/FileUtil.class.php +++ b/wcfsetup/install/files/lib/util/FileUtil.class.php @@ -37,6 +37,7 @@ final class FileUtil { * Tries to find the temp folder. * * @return string + * @throws SystemException */ public static function getTempFolder() { try { @@ -519,6 +520,7 @@ final class FileUtil { * permissions and goes up until 0666 for files and 0777 for directories. * * @param string $filename + * @throws SystemException */ public static function makeWritable($filename) { if (!file_exists($filename)) { diff --git a/wcfsetup/install/files/lib/util/HTTPRequest.class.php b/wcfsetup/install/files/lib/util/HTTPRequest.class.php index ff74522289..a902d1fd8d 100644 --- a/wcfsetup/install/files/lib/util/HTTPRequest.class.php +++ b/wcfsetup/install/files/lib/util/HTTPRequest.class.php @@ -550,6 +550,7 @@ final class HTTPRequest { * Sets options and applies default values when an option is omitted. * * @param array $options + * @throws SystemException */ private function setOptions(array $options) { if (!isset($options['timeout'])) { diff --git a/wcfsetup/install/files/lib/util/JSON.class.php b/wcfsetup/install/files/lib/util/JSON.class.php index 7b51d197be..b60aacff14 100644 --- a/wcfsetup/install/files/lib/util/JSON.class.php +++ b/wcfsetup/install/files/lib/util/JSON.class.php @@ -29,6 +29,7 @@ final class JSON { * @param string $json * @param boolean $asArray * @return array + * @throws SystemException */ public static function decode($json, $asArray = true) { // decodes JSON diff --git a/wcfsetup/install/files/lib/util/PasswordUtil.class.php b/wcfsetup/install/files/lib/util/PasswordUtil.class.php index 1eb596a98a..0ae53075c0 100644 --- a/wcfsetup/install/files/lib/util/PasswordUtil.class.php +++ b/wcfsetup/install/files/lib/util/PasswordUtil.class.php @@ -117,6 +117,7 @@ final class PasswordUtil { * @param string $password * @param string $dbHash * @return boolean + * @throws SystemException */ public static function checkPassword($username, $password, $dbHash) { $type = self::detectEncryption($dbHash); @@ -241,6 +242,7 @@ final class PasswordUtil { * @param integer $min * @param integer $max * @return integer + * @throws SystemException */ public static function secureRandomNumber($min, $max) { $range = $max - $min; diff --git a/wcfsetup/install/files/lib/util/XML.class.php b/wcfsetup/install/files/lib/util/XML.class.php index a30359320a..475a523cc4 100644 --- a/wcfsetup/install/files/lib/util/XML.class.php +++ b/wcfsetup/install/files/lib/util/XML.class.php @@ -50,6 +50,7 @@ class XML { * Loads a xml file for processing. * * @param string $path + * @throws SystemException */ public function load($path) { $this->path = $path; @@ -172,6 +173,7 @@ class XML { * * @param string $message * @param array $errors + * @throws SystemException */ protected function throwException($message, array $errors = array()) { if (!empty($errors)) { diff --git a/wcfsetup/install/files/lib/util/XMLWriter.class.php b/wcfsetup/install/files/lib/util/XMLWriter.class.php index 2e78be509c..662f2e283a 100644 --- a/wcfsetup/install/files/lib/util/XMLWriter.class.php +++ b/wcfsetup/install/files/lib/util/XMLWriter.class.php @@ -37,7 +37,8 @@ class XMLWriter { * @param string $rootElement * @param string $namespace * @param string $schemaLocation - * @param array $attributes + * @param string[] $attributes + * @throws SystemException */ public function beginDocument($rootElement, $namespace, $schemaLocation, array $attributes = array()) { if ($this->activeDocument) {