Improve code for better IDE integration
authorMatthias Schmidt <gravatronics@live.com>
Sun, 23 Jul 2017 05:17:12 +0000 (07:17 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 23 Jul 2017 05:17:12 +0000 (07:17 +0200)
wcfsetup/install/files/lib/data/category/CategoryAction.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserTrophyReceivedNotificationEvent.class.php

index 1e15e77a4beabe09bbdb76f189755f21dd3009a9..a7c2fd234be0b4574a94dc829c3c83badeba7585 100644 (file)
@@ -47,7 +47,7 @@ class CategoryAction extends AbstractDatabaseObjectAction implements ISortableAc
                if (!empty($this->objects)) {
                        // identify i18n labels
                        $languageVariables = [];
-                       foreach ($this->objects as $category) {
+                       foreach ($this->getObjects() as $category) {
                                if ($category->title === $category->getProcessor()->getI18nLangVarPrefix() . '.title.category' . $category->categoryID) {
                                        $languageVariables[] = $category->title;
                                }
index 14e7bfe6d932d238ff99c36999f80aae655bb53d..2d2d464bfd72c156bf28a6bc9dfec3f8bee6a014 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\system\user\notification\event;
+use wcf\system\user\notification\object\UserTrophyNotificationObject;
 
 /**
  * Notification event for receiving a user trophy. 
@@ -8,6 +9,8 @@ namespace wcf\system\user\notification\event;
  * @copyright  2001-2017 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    WoltLabSuite\Core\System\User\Notification\Object\Type
+ * 
+ * @method     UserTrophyNotificationObject    getUserNotificationObject()
  */
 class UserTrophyReceivedNotificationEvent extends AbstractUserNotificationEvent {
        /**
@@ -38,13 +41,13 @@ class UserTrophyReceivedNotificationEvent extends AbstractUserNotificationEvent
         * @inheritDoc
         */
        public function getLink() {
-               return $this->userNotificationObject->getTrophy()->getLink();
+               return $this->getUserNotificationObject()->getTrophy()->getLink();
        }
        
        /**
         * @inheritDoc
         */
        public function checkAccess() {
-               return $this->userNotificationObject->getDecoratedObject()->canSee();
+               return $this->getUserNotificationObject()->getDecoratedObject()->canSee();
        }
 }