From 8ff2cd798c6b2fbaf035fb222cd6271f23452389 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 20 May 2016 19:41:46 +0200 Subject: [PATCH] Fix indentations --- .../files/lib/acp/form/BoxAddForm.class.php | 4 +- .../files/lib/acp/form/MenuAddForm.class.php | 4 +- .../files/lib/acp/form/PageAddForm.class.php | 14 +-- .../files/lib/acp/form/PageEditForm.class.php | 2 +- .../lib/data/ITitledLinkObject.class.php | 2 +- .../files/lib/data/bbcode/BBCode.class.php | 4 +- .../install/files/lib/data/box/Box.class.php | 15 +-- .../files/lib/data/menu/MenuCache.class.php | 2 +- .../files/lib/data/page/Page.class.php | 24 ++-- .../files/lib/data/page/PageCache.class.php | 10 +- .../user/follow/UserFollowAction.class.php | 6 +- .../user/ignore/UserIgnoreAction.class.php | 6 +- .../install/files/lib/system/WCF.class.php | 2 +- .../install/files/lib/system/WCFACP.class.php | 4 +- .../system/bbcode/HtmlBBCodeParser.class.php | 44 ++++---- .../lib/system/box/IBoxController.class.php | 2 +- .../TodaysBirthdaysBoxController.class.php | 2 +- .../cache/builder/PageCacheBuilder.class.php | 6 +- .../edit/IHistorySavingObject.class.php | 2 +- ...mlInputNodeWoltlabMetacodeMarker.class.php | 68 +++++------ .../converter/IMetacodeConverter.class.php | 10 +- .../BoxPackageInstallationPlugin.class.php | 14 +-- .../MenuPackageInstallationPlugin.class.php | 12 +- .../system/page/PageLocationManager.class.php | 8 +- .../system/request/ControllerMap.class.php | 8 +- .../search/ISearchableObjectType.class.php | 17 +-- .../system/session/SessionHandler.class.php | 2 +- .../install/files/lib/util/DOMUtil.class.php | 106 +++++++++--------- 28 files changed, 201 insertions(+), 199 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php index 46206fee88..ebcbb59943 100644 --- a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php @@ -312,8 +312,8 @@ class BoxAddForm extends AbstractForm { if (!empty($this->pageIDs)) { $conditionBuilder = new PreparedStatementConditionBuilder(); $conditionBuilder->add('pageID IN (?)', [$this->pageIDs]); - $sql = "SELECT pageID - FROM wcf".WCF_N."_page + $sql = "SELECT pageID + FROM wcf".WCF_N."_page " . $conditionBuilder; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($conditionBuilder->getParameters()); diff --git a/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php b/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php index 285f8e0cb3..7112dc6646 100644 --- a/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php @@ -127,8 +127,8 @@ class MenuAddForm extends AbstractForm { if (!empty($this->pageIDs)) { $conditionBuilder = new PreparedStatementConditionBuilder(); $conditionBuilder->add('pageID IN (?)', [$this->pageIDs]); - $sql = "SELECT pageID - FROM wcf".WCF_N."_page + $sql = "SELECT pageID + FROM wcf".WCF_N."_page " . $conditionBuilder; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($conditionBuilder->getParameters()); diff --git a/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php index 4342fe47fd..02c04a8b08 100644 --- a/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php @@ -155,7 +155,7 @@ class PageAddForm extends AbstractForm { /** * Reads basic page parameters controlling type and i18n. * - * @throws IllegalLinkException + * @throws IllegalLinkException */ protected function readPageType() { if (!empty($_REQUEST['isMultilingual'])) $this->isMultilingual = 1; @@ -229,7 +229,7 @@ class PageAddForm extends AbstractForm { /** * Validates page type. * - * @throws UserInputException + * @throws UserInputException */ protected function validatePageType() { if (!in_array($this->pageType, Page::$availablePageTypes) || $this->pageType == 'system') { @@ -244,7 +244,7 @@ class PageAddForm extends AbstractForm { /** * Validates parent page id. * - * @throws UserInputException + * @throws UserInputException */ protected function validateParentPageID() { if ($this->parentPageID) { @@ -258,7 +258,7 @@ class PageAddForm extends AbstractForm { /** * Validates package id. * - * @throws UserInputException + * @throws UserInputException */ protected function validateApplicationPackageID() { if (!isset($this->availableApplications[$this->applicationPackageID])) { @@ -269,7 +269,7 @@ class PageAddForm extends AbstractForm { /** * Validates custom urls. * - * @throws UserInputException + * @throws UserInputException */ protected function validateCustomUrl() { foreach ($this->customURL as $type => $customURL) { @@ -282,7 +282,7 @@ class PageAddForm extends AbstractForm { /** * Validates box ids. * - * @throws UserInputException + * @throws UserInputException */ protected function validateBoxIDs() { foreach ($this->boxIDs as $boxID) { @@ -295,7 +295,7 @@ class PageAddForm extends AbstractForm { /** * Prepares box to page assignments * - * @return mixed[] + * @return mixed[] */ protected function getBoxToPage() { $boxToPage = []; diff --git a/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php index 4b53f7cb67..1be97d78b0 100644 --- a/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php @@ -39,7 +39,7 @@ class PageEditForm extends PageAddForm { /** * @inheritDoc * - * @throws IllegalLinkException + * @throws IllegalLinkException */ public function readParameters() { parent::readParameters(); diff --git a/wcfsetup/install/files/lib/data/ITitledLinkObject.class.php b/wcfsetup/install/files/lib/data/ITitledLinkObject.class.php index f2f069b3bb..80d5a80771 100644 --- a/wcfsetup/install/files/lib/data/ITitledLinkObject.class.php +++ b/wcfsetup/install/files/lib/data/ITitledLinkObject.class.php @@ -10,6 +10,6 @@ namespace wcf\data; * @package com.woltlab.wcf * @subpackage data * @category Community Framework - * @since 2.2 + * @since 2.2 */ interface ITitledLinkObject extends ILinkableObject, ITitledObject {} diff --git a/wcfsetup/install/files/lib/data/bbcode/BBCode.class.php b/wcfsetup/install/files/lib/data/bbcode/BBCode.class.php index 1d34e2818d..3b9a61d1a3 100644 --- a/wcfsetup/install/files/lib/data/bbcode/BBCode.class.php +++ b/wcfsetup/install/files/lib/data/bbcode/BBCode.class.php @@ -15,14 +15,14 @@ use wcf\system\WCF; * @package com.woltlab.wcf * @subpackage data.bbcode * @category Community Framework - * + * * @property-read integer $bbcodeID * @property-read string $bbcodeTag * @property-read integer $packageID * @property-read string $htmlOpen * @property-read string $htmlClose * @property-read string $className - * @property-read integer $isBlockElement + * @property-read integer $isBlockElement * @property-read string $wysiwygIcon * @property-read string $buttonLabel * @property-read integer $isSourceCode diff --git a/wcfsetup/install/files/lib/data/box/Box.class.php b/wcfsetup/install/files/lib/data/box/Box.class.php index 9e43fd1819..3edbc4163b 100644 --- a/wcfsetup/install/files/lib/data/box/Box.class.php +++ b/wcfsetup/install/files/lib/data/box/Box.class.php @@ -5,6 +5,7 @@ use wcf\data\media\ViewableMedia; use wcf\data\menu\Menu; use wcf\data\menu\MenuCache; use wcf\data\object\type\ObjectTypeCache; +use wcf\system\box\IBoxController; use wcf\system\box\IConditionBoxController; use wcf\system\condition\ConditionHandler; use wcf\data\page\Page; @@ -288,7 +289,7 @@ class Box extends DatabaseObject { /** * Returns the box controller. * - * @return \wcf\system\box\IBoxController + * @return IBoxController */ public function getController() { if ($this->controller === null && $this->objectTypeID) { @@ -432,8 +433,8 @@ class Box extends DatabaseObject { /** * Returns the template name of this box. * - * @param integer $languageID - * @return string + * @param integer $languageID + * @return string */ public function getTplName($languageID = null) { if ($this->boxType == 'tpl') { @@ -450,13 +451,13 @@ class Box extends DatabaseObject { /** * Returns box to page assignments. * - * @return integer[] + * @return integer[] */ public function getPageIDs() { if ($this->pageIDs === null) { - $sql = "SELECT pageID - FROM wcf" . WCF_N . "_box_to_page - WHERE boxID = ?"; + $sql = "SELECT pageID + FROM wcf" . WCF_N . "_box_to_page + WHERE boxID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute([$this->boxID]); diff --git a/wcfsetup/install/files/lib/data/menu/MenuCache.class.php b/wcfsetup/install/files/lib/data/menu/MenuCache.class.php index 41e673641a..63c4052807 100644 --- a/wcfsetup/install/files/lib/data/menu/MenuCache.class.php +++ b/wcfsetup/install/files/lib/data/menu/MenuCache.class.php @@ -65,7 +65,7 @@ class MenuCache extends SingletonFactory { /** * Returns the main menu or null. * - * @return Menu|null menu object + * @return Menu|null menu object */ public function getMainMenu() { return $this->getMenuByID(MenuCacheBuilder::getInstance()->getData([], 'mainMenuID')); diff --git a/wcfsetup/install/files/lib/data/page/Page.class.php b/wcfsetup/install/files/lib/data/page/Page.class.php index 4092791af6..3b7c8bc8bb 100644 --- a/wcfsetup/install/files/lib/data/page/Page.class.php +++ b/wcfsetup/install/files/lib/data/page/Page.class.php @@ -236,17 +236,17 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject { WCF::getDB()->beginTransaction(); // unmark existing landing page - $sql = "UPDATE wcf".WCF_N."_page - SET isLandingPage = ?"; + $sql = "UPDATE wcf".WCF_N."_page + SET isLandingPage = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute([ 0 ]); // set current page as landing page - $sql = "UPDATE wcf".WCF_N."_page - SET isLandingPage = ? - WHERE pageID = ?"; + $sql = "UPDATE wcf".WCF_N."_page + SET isLandingPage = ? + WHERE pageID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute([ 1, @@ -267,13 +267,13 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject { /** * Returns box to page assignments. * - * @return integer[] + * @return integer[] */ public function getBoxIDs() { if ($this->boxIDs === null) { - $sql = "SELECT boxID - FROM wcf" . WCF_N . "_box_to_page - WHERE pageID = ?"; + $sql = "SELECT boxID + FROM wcf" . WCF_N . "_box_to_page + WHERE pageID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute([$this->pageID]); $this->boxIDs = $statement->fetchAll(\PDO::FETCH_COLUMN); @@ -285,8 +285,8 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject { /** * Returns the template name of this page. * - * @param integer $languageID - * @return string + * @param integer $languageID + * @return string */ public function getTplName($languageID = null) { if ($this->pageType == 'tpl') { @@ -303,7 +303,7 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject { /** * Returns the value of a generic phrase based upon a page's identifier. * - * @return string generic title + * @return string generic title */ protected function getGenericTitle() { return WCF::getLanguage()->get('wcf.page.' . $this->identifier); diff --git a/wcfsetup/install/files/lib/data/page/PageCache.class.php b/wcfsetup/install/files/lib/data/page/PageCache.class.php index 76f6ab734f..1bf70af7fa 100644 --- a/wcfsetup/install/files/lib/data/page/PageCache.class.php +++ b/wcfsetup/install/files/lib/data/page/PageCache.class.php @@ -13,7 +13,7 @@ use wcf\system\WCF; * @package com.woltlab.wcf * @subpackage data.page * @category Community Framework - * @since 2.2 + * @since 2.2 */ class PageCache extends SingletonFactory { /** @@ -75,9 +75,9 @@ class PageCache extends SingletonFactory { * Returns the localized page title by page id, optionally retrieving the title * for given language id if it is a multilingual page. * - * @param integer $pageID page id - * @param integer $languageID specific value by language id - * @return string localized page title + * @param integer $pageID page id + * @param integer $languageID specific value by language id + * @return string localized page title */ public function getPageTitle($pageID, $languageID = null) { if (isset($this->cache['pageTitles'][$pageID])) { @@ -100,7 +100,7 @@ class PageCache extends SingletonFactory { /** * Returns the global landing page. * - * @return Page + * @return Page */ public function getLandingPage() { return $this->cache['landingPage']; diff --git a/wcfsetup/install/files/lib/data/user/follow/UserFollowAction.class.php b/wcfsetup/install/files/lib/data/user/follow/UserFollowAction.class.php index 999a0678e1..6a64c914a8 100644 --- a/wcfsetup/install/files/lib/data/user/follow/UserFollowAction.class.php +++ b/wcfsetup/install/files/lib/data/user/follow/UserFollowAction.class.php @@ -46,9 +46,9 @@ class UserFollowAction extends AbstractDatabaseObjectAction implements IGroupedU } // check if current user is ignored by target user - $sql = "SELECT ignoreID - FROM wcf".WCF_N."_user_ignore - WHERE userID = ? + $sql = "SELECT ignoreID + FROM wcf".WCF_N."_user_ignore + WHERE userID = ? AND ignoreUserID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute([ diff --git a/wcfsetup/install/files/lib/data/user/ignore/UserIgnoreAction.class.php b/wcfsetup/install/files/lib/data/user/ignore/UserIgnoreAction.class.php index db49a382e1..c8f08fd233 100644 --- a/wcfsetup/install/files/lib/data/user/ignore/UserIgnoreAction.class.php +++ b/wcfsetup/install/files/lib/data/user/ignore/UserIgnoreAction.class.php @@ -56,9 +56,9 @@ class UserIgnoreAction extends AbstractDatabaseObjectAction { UserStorageHandler::getInstance()->reset([WCF::getUser()->userID], 'ignoredUserIDs'); // check if target user is following the current user - $sql = "SELECT * - FROM wcf".WCF_N."_user_follow - WHERE userID = ? + $sql = "SELECT * + FROM wcf".WCF_N."_user_follow + WHERE userID = ? AND followUserID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute([ diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index f0a637df0f..d0bc4c7b95 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -939,7 +939,7 @@ class WCF { /** * Returns true if currently active request represents the landing page. * - * @return boolean + * @return boolean */ public static function isLandingPage() { return RequestHandler::getInstance()->getActiveRequest()->isLandingPage(); diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 38242873d1..9a8c333c9e 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -73,8 +73,8 @@ class WCFACP extends WCF { /** * Returns the main menu object. * - * @return Menu|null menu object - * @since 2.2 + * @return Menu|null menu object + * @since 2.2 */ public function getFrontendMenu() { return MenuCache::getInstance()->getMainMenu(); diff --git a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php index a6f9b239c3..d057c11287 100644 --- a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php @@ -13,13 +13,13 @@ use wcf\util\StringUtil; * are