From 39725fbecb4f17963d5c8cfd8fcd4442c391dd97 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 16 May 2016 12:14:32 +0200 Subject: [PATCH] Fix return type of Category::getObjectType() --- .../lib/data/category/Category.class.php | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/wcfsetup/install/files/lib/data/category/Category.class.php b/wcfsetup/install/files/lib/data/category/Category.class.php index b8bad41e52..ed5f0dea90 100644 --- a/wcfsetup/install/files/lib/data/category/Category.class.php +++ b/wcfsetup/install/files/lib/data/category/Category.class.php @@ -1,10 +1,12 @@ * @package com.woltlab.wcf * @subpackage data.category * @category Community Framework - * + * * @property-read integer $categoryID * @property-read integer $objectTypeID * @property-read integer $parentCategoryID @@ -44,7 +46,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I /** * parent category of this category - * @var \wcf\data\category\Category + * @var Category */ protected $parentCategory = null; @@ -60,7 +62,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I * belong to * @var array */ - protected $userPermissions = array(); + protected $userPermissions = []; /** * fallback return value used in Category::getPermission() @@ -69,22 +71,22 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I protected $defaultPermission = false; /** - * @see \wcf\data\DatabaseObject::$databaseTableIndexName + * @inheritDoc */ protected static $databaseTableIndexName = 'categoryID'; /** - * @see \wcf\data\DatabaseObject::$databaseTableName + * @inheritDoc */ protected static $databaseTableName = 'category'; /** - * @see \wcf\data\ProcessibleDatabaseObject::$processorInterface + * @inheritDoc */ - protected static $processorInterface = 'wcf\system\category\ICategoryType'; + protected static $processorInterface = ICategoryType::class; /** - * @see \wcf\data\IStorableObject::__get() + * @inheritDoc */ public function __get($name) { // forward 'className' property requests to object type @@ -105,7 +107,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I } /** - * @see \wcf\data\IPermissionObject::checkPermissions() + * @inheritDoc */ public function checkPermissions(array $permissions) { foreach ($permissions as $permission) { @@ -118,7 +120,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I /** * Returns the category object type of the category. * - * @return \wcf\data\category\Category + * @return ObjectType */ public function getObjectType() { return CategoryHandler::getInstance()->getObjectType($this->objectTypeID); @@ -140,7 +142,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I /** * Returns the parent category of this category. * - * @return \wcf\data\category\Category + * @return Category */ public function getParentCategory() { if ($this->parentCategoryID && $this->parentCategory === null) { @@ -157,7 +159,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I */ public function getParentCategories() { if ($this->parentCategories === null) { - $this->parentCategories = array(); + $this->parentCategories = []; $parentCaregory = $this; while ($parentCaregory = $parentCaregory->getParentCategory()) { $this->parentCategories[] = $parentCaregory; @@ -172,7 +174,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I /** * Returns true if given category is a parent category of this category. * - * @param \wcf\data\category\Category $category + * @param Category $category * @return boolean */ public function isParentCategory(Category $category) { @@ -180,7 +182,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I } /** - * @see \wcf\data\IPermissionObject::getPermission() + * @inheritDoc */ public function getPermission($permission, User $user = null) { if ($user === null) { @@ -211,7 +213,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I } /** - * @see \wcf\data\ITitledObject::getTitle() + * @inheritDoc */ public function getTitle() { return WCF::getLanguage()->get($this->title); @@ -228,20 +230,20 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I } /** - * @see \wcf\data\DatabaseObject::handleData() + * @inheritDoc */ protected function handleData($data) { // handle additional data $data['additionalData'] = @unserialize($data['additionalData']); if (!is_array($data['additionalData'])) { - $data['additionalData'] = array(); + $data['additionalData'] = []; } parent::handleData($data); } /** - * @see \wcf\data\ITitledObject::getTitle() + * @inheritDoc */ public function __toString() { return $this->getTitle(); -- 2.20.1