From: Matthias Schmidt Date: Fri, 25 Mar 2016 16:45:10 +0000 (+0100) Subject: Fix undefined class (documentation) issues X-Git-Tag: 3.0.0_Beta_1~1286^2~47 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=592454d442515e5ebbf3dbdd49bc8650546639bb;p=GitHub%2FWoltLab%2FWCF.git Fix undefined class (documentation) issues --- diff --git a/wcfsetup/install/files/lib/acp/action/ClipboardAction.class.php b/wcfsetup/install/files/lib/acp/action/ClipboardAction.class.php deleted file mode 100644 index 64bf77e28a..0000000000 --- a/wcfsetup/install/files/lib/acp/action/ClipboardAction.class.php +++ /dev/null @@ -1,14 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage acp.action - * @category Community Framework - */ -class ClipboardAction extends \wcf\action\ClipboardAction { } diff --git a/wcfsetup/install/files/lib/acp/action/ClipboardLoadMarkedItemsAction.class.php b/wcfsetup/install/files/lib/acp/action/ClipboardLoadMarkedItemsAction.class.php deleted file mode 100644 index ff27e17913..0000000000 --- a/wcfsetup/install/files/lib/acp/action/ClipboardLoadMarkedItemsAction.class.php +++ /dev/null @@ -1,14 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage acp.action - * @category Community Framework - */ -class ClipboardLoadMarkedItemsAction extends \wcf\action\ClipboardLoadMarkedItemsAction { } diff --git a/wcfsetup/install/files/lib/acp/action/ClipboardProxyAction.class.php b/wcfsetup/install/files/lib/acp/action/ClipboardProxyAction.class.php deleted file mode 100644 index 97f8eb4591..0000000000 --- a/wcfsetup/install/files/lib/acp/action/ClipboardProxyAction.class.php +++ /dev/null @@ -1,14 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage acp.action - * @category Community Framework - */ -class ClipboardProxyAction extends \wcf\action\ClipboardProxyAction { } diff --git a/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php index 7e0a0c440e..6188a45b76 100644 --- a/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php @@ -3,6 +3,7 @@ namespace wcf\acp\form; use wcf\data\category\CategoryAction; use wcf\data\category\CategoryEditor; use wcf\data\category\UncachedCategoryNodeTree; +use wcf\data\object\type\ObjectType; use wcf\form\AbstractForm; use wcf\system\acl\ACLHandler; use wcf\system\category\CategoryHandler; diff --git a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php index 2e96317adb..0a5506d8e8 100755 --- a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php @@ -30,7 +30,7 @@ class PackageStartInstallForm extends AbstractForm { /** * updated package object - * @var \wcf\system\package\Package + * @var \wcf\data\package\Package */ public $package = null; diff --git a/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php index bd2be4e876..018467dc56 100644 --- a/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php @@ -1,5 +1,6 @@ timezoneObj === null) { 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 ab0c1a4563..a570aeef64 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 @@ -1,9 +1,11 @@ contentManager === null) { @@ -55,11 +57,11 @@ class UserProfileMenuItem extends DatabaseObject { throw new SystemException("Unable to find class '".$this->className."'"); } - if (!is_subclass_of($this->className, 'wcf\system\SingletonFactory')) { + if (!is_subclass_of($this->className, SingletonFactory::class)) { throw new SystemException("'".$this->className."' does not extend 'wcf\system\SingletonFactory'"); } - if (!is_subclass_of($this->className, 'wcf\system\menu\user\profile\content\IUserProfileMenuContent')) { + if (!is_subclass_of($this->className, IUserProfileMenuContent::class)) { throw new SystemException("'".$this->className."' does not implement 'wcf\system\menu\user\profile\content\IUserProfileMenuContent'"); } diff --git a/wcfsetup/install/files/lib/form/UserSearchForm.class.php b/wcfsetup/install/files/lib/form/UserSearchForm.class.php index 432b75e25e..7f72f72716 100644 --- a/wcfsetup/install/files/lib/form/UserSearchForm.class.php +++ b/wcfsetup/install/files/lib/form/UserSearchForm.class.php @@ -46,8 +46,8 @@ class UserSearchForm extends UserOptionListForm { public $matches = array(); /** - * condtion builder object - * @var \wcf\system\database\condition\PreparedStatementConditionBuilder + * condition builder object + * @var PreparedStatementConditionBuilder */ public $conditions = null; diff --git a/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php index b187c82cd4..cec9aafa77 100644 --- a/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php @@ -228,8 +228,8 @@ class BBCodeParser extends SingletonFactory { /** * Validates an attributes of a tag. * - * @param array $tagAttributes - * @param \wcf\data\bbcode\BBCodeAttribute $definedTagAttribute + * @param array $tagAttributes + * @param BBCodeAttribute $definedTagAttribute * @return boolean */ protected function isValidTagAttribute(array $tagAttributes, BBCodeAttribute $definedTagAttribute) { diff --git a/wcfsetup/install/files/lib/system/dashboard/box/TodaysFollowingBirthdaysDashboardBox.class.php b/wcfsetup/install/files/lib/system/dashboard/box/TodaysFollowingBirthdaysDashboardBox.class.php index 8f3640f1bd..f9867464ef 100644 --- a/wcfsetup/install/files/lib/system/dashboard/box/TodaysFollowingBirthdaysDashboardBox.class.php +++ b/wcfsetup/install/files/lib/system/dashboard/box/TodaysFollowingBirthdaysDashboardBox.class.php @@ -1,6 +1,7 @@ + * @var UserProfile[] */ - public $userProfiles = array(); + public $userProfiles = []; /** - * @see \wcf\system\dashboard\box\IDashboardBox::init() + * @inheritDoc */ public function init(DashboardBox $box, IPage $page) { parent::init($box, $page); @@ -56,16 +57,16 @@ class TodaysFollowingBirthdaysDashboardBox extends AbstractSidebarDashboardBox { } /** - * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render() + * @inheritDoc */ protected function render() { if (empty($this->userProfiles)) { return ''; } - WCF::getTPL()->assign(array( + WCF::getTPL()->assign([ 'birthdayUserProfiles' => $this->userProfiles - )); + ]); return WCF::getTPL()->fetch('dashboardBoxTodaysFollowingBirthdays'); } } diff --git a/wcfsetup/install/files/lib/system/email/mime/AbstractMimePart.class.php b/wcfsetup/install/files/lib/system/email/mime/AbstractMimePart.class.php index e68bfac686..e91c732377 100644 --- a/wcfsetup/install/files/lib/system/email/mime/AbstractMimePart.class.php +++ b/wcfsetup/install/files/lib/system/email/mime/AbstractMimePart.class.php @@ -24,7 +24,7 @@ abstract class AbstractMimePart { * Returns the transfer encoding to use. Must either be * 'quoted-printable' or 'base64'. * - * @return Either 'quoted-printable' or 'base64' + * @return string either 'quoted-printable' or 'base64' */ abstract public function getContentTransferEncoding(); 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 b9afe58061..7f65c95a71 100644 --- a/wcfsetup/install/files/lib/system/email/mime/AttachmentMimePart.class.php +++ b/wcfsetup/install/files/lib/system/email/mime/AttachmentMimePart.class.php @@ -1,6 +1,7 @@ $parameters - * @param string $containerClassName - * @param string $containerDecoratorClassName + * @param IMessageQuickReplyAction $object + * @param array $parameters + * @param string $containerClassName + * @param string $containerDecoratorClassName */ 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 d50b644f1c..f4b38391a3 100644 --- a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php +++ b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php @@ -1,5 +1,6 @@ + * @var string[] */ public $fullQuotes = array(); /** * quotable database object - * @var \wcf\data\IQuotableDatabaseObject + * @var IMessage */ public $object = null; /** - * list of quotes (shortend) - * @var array + * list of quotes (shortened) + * @var string[] */ public $quotes = array(); @@ -39,14 +39,14 @@ class QuotedMessage implements \Countable, \Iterator { /** * list of index to object relation - * @var array + * @var integer[] */ protected $indexToObject = null; /** * Creates a new QuotedMessage object. * - * @param \wcf\data\IMessage $object + * @param IMessage $object */ public function __construct(IMessage $object) { $this->object = $object; @@ -66,7 +66,7 @@ class QuotedMessage implements \Countable, \Iterator { } /** - * @see \wcf\data\ITitledObject::getTitle() + * @see ITitledObject::getTitle() */ public function __toString() { return $this->object->getTitle(); diff --git a/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php b/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php index 258bedede6..1e22d16ed6 100644 --- a/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php @@ -12,7 +12,7 @@ use wcf\util\StringUtil; * Option type implementation for radio buttons. * * @author Marcel Werk - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf * @subpackage system.option @@ -26,7 +26,7 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon public $templateName = 'radioButtonOptionType'; /** - * @see \wcf\system\option\IOptionType::getFormElement() + * @inheritDoc */ public function getFormElement(Option $option, $value) { $availableOptions = $option->parseMultipleEnableOptions(); @@ -53,7 +53,7 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon } /** - * @see \wcf\system\option\IOptionType::validate() + * @inheritDoc */ public function validate(Option $option, $newValue) { if (!empty($newValue)) { @@ -65,7 +65,7 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon } /** - * @see \wcf\system\option\ISearchableUserOption::getSearchFormElement() + * @inheritDoc */ public function getSearchFormElement(Option $option, $value) { $this->templateName = 'radioButtonSearchableOptionType'; @@ -75,7 +75,7 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon } /** - * @see \wcf\system\option\ISearchableUserOption::getCondition() + * @inheritDoc */ public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) { if (!isset($_POST['searchOptions'][$option->optionName])) return false; @@ -85,21 +85,21 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon } /** - * @see \wcf\system\option\ISearchableConditionUserOption::addCondition() + * @inheritDoc */ public function addCondition(UserList $userList, Option $option, $value) { $userList->getConditionBuilder()->add('user_option_value.userOption'.$option->optionID.' = ?', array(StringUtil::trim($value))); } /** - * @see \wcf\system\option\ISearchableConditionUserOption::checkUser() + * @inheritDoc */ public function checkUser(User $user, Option $option, $value) { return mb_strtolower($user->getUserOption($option->optionName)) == mb_strtolower(StringUtil::trim($value)); } /** - * @see \wcf\system\option\ISearchableConditionUserOption::getConditionData() + * @inheritDoc */ public function getConditionData(Option $option, $newValue) { return $newValue; @@ -108,8 +108,8 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon /** * Returns the select options for the given option. * - * @param \wcf\dat\option\Option $option - * @return array + * @param Option $option + * @return string[] */ protected function getSelectOptions(Option $option) { return $option->parseSelectOptions(); diff --git a/wcfsetup/install/files/lib/system/option/UrlControllerReplacementOptionType.class.php b/wcfsetup/install/files/lib/system/option/UrlControllerReplacementOptionType.class.php deleted file mode 100644 index 30e59861d6..0000000000 --- a/wcfsetup/install/files/lib/system/option/UrlControllerReplacementOptionType.class.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage system.option - * @category Community Framework - */ -class UrlControllerReplacementOptionType extends TextareaOptionType { - /** - * list of known controllers grouped by application - * @var array - */ - protected $controllers = null; - - /** - * @see \wcf\system\option\IOptionType::getData() - */ - public function getData(Option $option, $newValue) { - return $this->cleanup($newValue); - } - - /** - * @see \wcf\system\option\IOptionType::validate() - */ - public function validate(Option $option, $newValue) { - $newValue = $this->cleanup($newValue); - if (!empty($newValue)) { - $lines = explode("\n", $newValue); - - $aliases = array(); - $controllers = array(); - for ($i = 0, $length = count($lines); $i < $length; $i++) { - $line = $lines[$i]; - if (preg_match('~^(?P[a-z][a-z0-9\-]+)=(?P[a-z][a-z0-9\-]+)$~', $line, $matches)) { - // check if there is already a replacement for given controller - if (in_array($matches['controller'], $controllers)) { - WCF::getTPL()->assign('urlControllerReplacementError', $matches['controller']); - throw new UserInputException($option->optionName, 'controllerReplacementDuplicateController', array('controller' => $matches['controller'])); - } - - // check if there is already the same alias for a different controller - if (in_array($matches['alias'], $aliases)) { - WCF::getTPL()->assign('urlControllerReplacementError', $matches['alias']); - throw new UserInputException($option->optionName, 'controllerReplacementDuplicateAlias', array('alias' => $matches['alias'])); - } - - $aliases[] = $matches['alias']; - $controllers[] = $matches['controller']; - - // check if controller exists - if (!$this->isKnownController($matches['controller'])) { - WCF::getTPL()->assign('urlControllerReplacementError', $matches['controller']); - throw new UserInputException($option->optionName, 'controllerReplacementUnknown', array('controller' => $matches['controller'])); - } - - // check if alias collides with an existing controller name - if ($this->isKnownController($matches['alias'])) { - WCF::getTPL()->assign('urlControllerReplacementError', $matches['alias']); - throw new UserInputException($option->optionName, 'controllerReplacementCollision', array('alias' => $matches['alias'])); - } - } - else { - WCF::getTPL()->assign('urlControllerReplacementError', $line); - throw new UserInputException($option->optionName, 'controllerReplacementInvalidFormat', array('line' => $line)); - } - } - } - } - - /** - * Cleans up newlines and converts input to lower-case. - * - * @param string $newValue - * @return string - */ - protected function cleanup($newValue) { - $newValue = StringUtil::unifyNewlines($newValue); - $newValue = trim($newValue); - $newValue = preg_replace('~\n+~', "\n", $newValue); - $newValue = mb_strtolower($newValue); - - return $newValue; - } - - /** - * Returns true if given controller name is known to the system, used to - * prevent aliases colliding with existing ones. - * - * @param string $controller - * @return boolean - */ - protected function isKnownController($controller) { - if ($this->controllers === null) { - $this->controllers = ControllerCacheBuilder::getInstance()->getData(array( - 'environment' => 'user' - )); - } - - $controller = str_replace('-', '', $controller); - foreach ($this->controllers as $types) { - foreach ($types as $controllers) { - if (isset($controllers[$controller])) { - return true; - } - } - } - - return false; - } -} diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 287d1b5db4..fbce7a40e9 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -656,9 +656,9 @@ class PackageInstallationDispatcher { /** * Extracts files from .tar(.gz) archive and installs them * - * @param string $targetDir - * @param string $sourceArchive - * @param FileHandler $fileHandler + * @param string $targetDir + * @param string $sourceArchive + * @param \wcf\system\setup\IFileHandler $fileHandler * @return \wcf\system\setup\Installer */ public function extractFiles($targetDir, $sourceArchive, $fileHandler = null) { diff --git a/wcfsetup/install/files/lib/system/package/validation/PackageValidationManager.class.php b/wcfsetup/install/files/lib/system/package/validation/PackageValidationManager.class.php index 274cc9e207..0f19fc0a73 100644 --- a/wcfsetup/install/files/lib/system/package/validation/PackageValidationManager.class.php +++ b/wcfsetup/install/files/lib/system/package/validation/PackageValidationManager.class.php @@ -178,9 +178,9 @@ class PackageValidationManager extends SingletonFactory { * * Please be aware that unknown PIPs will silently ignored and cause no error. * - * @param \wcf\data\package\PackageArchive $archive - * @param string $pip - * @param string $instruction + * @param PackageArchive $archive + * @param string $pip + * @param string $instruction * @return boolean */ public function validatePackageInstallationPluginInstruction(PackageArchive $archive, $pip, $instruction) { diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index df9bd20d54..731c24bda2 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -19,7 +19,7 @@ use wcf\util\StringUtil; class TemplateScriptingCompiler { /** * template engine object - * @var \wcf\system\template\TemplateEngine + * @var TemplateEngine */ protected $template; @@ -175,7 +175,7 @@ class TemplateScriptingCompiler { /** * Creates a new TemplateScriptingCompiler object. * - * @param \wcf\system\templateTemplateEngine $template + * @param TemplateEngine $template */ public function __construct(TemplateEngine $template) { $this->template = $template; @@ -1413,7 +1413,7 @@ class TemplateScriptingCompiler { /** * Returns the instance of the template engine class. * - * @return \wcf\system\templateTemplateEngine + * @return TemplateEngine */ public function getTemplate() { return $this->template; diff --git a/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php b/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php index af17f4b137..5e76a23367 100644 --- a/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php +++ b/wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php @@ -3,6 +3,7 @@ namespace wcf\system\upload; use wcf\data\AbstractDatabaseObjectAction; use wcf\data\IFile; use wcf\data\IThumbnailFile; +use wcf\system\exception\SystemException; use wcf\system\image\ImageHandler; use wcf\system\WCF; use wcf\util\ExifUtil; diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php index 78e47f1165..d93b5c45e4 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php @@ -1,5 +1,6 @@