From: Matthias Schmidt Date: Sun, 26 Nov 2017 16:16:00 +0000 (+0100) Subject: Add missing method documentation X-Git-Tag: 3.1.0_Beta_4~50 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9261db9222ac72d339f1e6a5871fd8f8f00c6e2b;p=GitHub%2FWoltLab%2FWCF.git Add missing method documentation --- diff --git a/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php index 109aa1e53b..068a2c09be 100644 --- a/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php @@ -97,7 +97,9 @@ abstract class AbstractAcpForm extends AbstractForm { } /** - * @inheritDoc + * Reads the i18n data for the given object. + * + * @param DatabaseObject $databaseObject */ public function readDataI18n(DatabaseObject $databaseObject) { if (empty($_POST) && !empty($this->i18nValues)) { @@ -112,6 +114,13 @@ abstract class AbstractAcpForm extends AbstractForm { } } + /** + * Saves the i18n data for the given database object befor the changes of + * the given database object are saved. + * + * @param DatabaseObject $databaseObject + * @return string[] + */ public function beforeSaveI18n(DatabaseObject $databaseObject) { $values = []; @@ -139,7 +148,11 @@ abstract class AbstractAcpForm extends AbstractForm { } /** - * @inheritDoc + * Saves the i18n data for the given database object after the given database + * object has been created. + * + * @param DatabaseObject $databaseObject + * @return string[] */ public function saveI18n(DatabaseObject $databaseObject, $editorClass) { $data = []; diff --git a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php index 1929ccbe25..7eeaa6d309 100644 --- a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php +++ b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php @@ -206,6 +206,9 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli ]; } + /** + * Validates the `loadComment` action. + */ public function validateLoadComment() { $this->readInteger('objectID', false, 'data'); $this->readInteger('responseID', true, 'data'); @@ -231,6 +234,11 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli } } + /** + * Returns a rendered comment. + * + * @return string[] + */ public function loadComment() { if ($this->comment === null) { return ['template' => '']; @@ -243,10 +251,18 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli return (is_array($returnValues)) ? $returnValues : ['template' => $returnValues]; } + /** + * Validates the `loadResponse` action. + */ public function validateLoadResponse() { $this->validateLoadComment(); } + /** + * Returns a rendered comment. + * + * @return string[] + */ public function loadResponse() { if ($this->comment === null || $this->response === null) { return ['template' => '']; diff --git a/wcfsetup/install/files/lib/data/style/Style.class.php b/wcfsetup/install/files/lib/data/style/Style.class.php index ecfd258b1f..1844e91389 100644 --- a/wcfsetup/install/files/lib/data/style/Style.class.php +++ b/wcfsetup/install/files/lib/data/style/Style.class.php @@ -150,22 +150,49 @@ class Style extends DatabaseObject { return WCF::getPath().'images/stylePreview@2x.png'; } + /** + * Returns the absolute path to the apple touch icon. + * + * @return string + */ public function getFaviconAppleTouchIcon() { return $this->getFaviconPath('apple-touch-icon.png'); } + /** + * Returns the absolute path to the `manifest.json` file. + * + * @return string + */ public function getFaviconManifest() { return $this->getFaviconPath('manifest.json'); } + /** + * Returns the absolute path to the `browserconfig.xml` file. + * + * @return string + */ public function getFaviconBrowserconfig() { return $this->getFaviconPath('browserconfig.xml'); } + /** + * Returns the relative path to the favicon. + * + * @return string + */ public function getRelativeFavicon() { return $this->getFaviconPath('favicon.ico', false); } + /** + * Returns the path to a favicon-related file. + * + * @param string $filename name of the file + * @param boolean $absolutePath if `true`, the absolute path is returned, otherwise the path relative to WCF is returned + * @return string + */ protected function getFaviconPath($filename, $absolutePath = true) { if ($filename === 'manifest.json') { if (ApplicationHandler::getInstance()->getActiveApplication()->domainName !== ApplicationHandler::getInstance()->getApplicationByID(1)->domainName) {