From: Joshua Rüsweg Date: Thu, 2 Aug 2018 11:18:34 +0000 (+0200) Subject: Fix some smaller issues X-Git-Tag: 5.2.0_Alpha_1~364^2~101^2~30 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=75478e9797eadd321ff076247eecbda6f41031ac;p=GitHub%2FWoltLab%2FWCF.git Fix some smaller issues See #2508 --- diff --git a/wcfsetup/install/files/lib/data/reaction/ReactionAction.class.php b/wcfsetup/install/files/lib/data/reaction/ReactionAction.class.php index ede79405db..e80d8f0f96 100644 --- a/wcfsetup/install/files/lib/data/reaction/ReactionAction.class.php +++ b/wcfsetup/install/files/lib/data/reaction/ReactionAction.class.php @@ -226,7 +226,7 @@ class ReactionAction extends AbstractDatabaseObjectAction { $likeList->getConditionBuilder()->add("like_table.reactionTypeID = ?", [$this->parameters['reactionTypeID']]); $likeList->readObjects(); - if (!count($likeList)) { + if (empty($likeList)) { return []; } diff --git a/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeCache.class.php b/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeCache.class.php index ea8e0f8c98..3f1b11c692 100644 --- a/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeCache.class.php +++ b/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeCache.class.php @@ -28,7 +28,7 @@ class ReactionTypeCache extends SingletonFactory { /** * @inheritDoc */ - public function init() { + protected function init() { $this->reactionTypes = ReactionTypeCacheBuilder::getInstance()->getData(); $this->enabledReactionTypes = ReactionTypeCacheBuilder::getInstance()->getData(['onlyEnabled' => 1]); } @@ -36,12 +36,12 @@ class ReactionTypeCache extends SingletonFactory { /** * Returns the reaction type with the given reactionTypeID. * - * @param integer $trophyID + * @param integer $reactionTypeID * @return ReactionType */ - public function getReactionTypeByID($trophyID) { - if (isset($this->reactionTypes[$trophyID])) { - return $this->reactionTypes[$trophyID]; + public function getReactionTypeByID($reactionTypeID) { + if (isset($this->reactionTypes[$reactionTypeID])) { + return $this->reactionTypes[$reactionTypeID]; } return null;