Skip to content

Commit ff42166

Browse files
committed
Fix phpstan issues
1 parent e4a7272 commit ff42166

6 files changed

Lines changed: 3 additions & 18 deletions

File tree

wcfsetup/install/files/lib/data/article/category/ArticleCategory.class.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@
2525
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
2626
* @since 3.0
2727
*
28-
* @method ArticleCategory[] getChildCategories()
29-
* @method ArticleCategory[] getAllChildCategories()
30-
* @method ?ArticleCategory getParentCategory()
31-
* @method ArticleCategory[] getParentCategories()
32-
* @method static ArticleCategory|null getCategory($categoryID)
33-
* @property-read string $sortField
34-
* @property-read string $sortOrder
28+
* @property-read string $sortField
29+
* @property-read string $sortOrder
3530
*/
3631
class ArticleCategory extends AbstractDecoratedCategory implements IAccessibleObject, ITitledLinkObject
3732
{

wcfsetup/install/files/lib/data/category/AbstractDecoratedCategory.class.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ public function getParentCategories()
114114
public function getParentCategory()
115115
{
116116
if ($this->parentCategoryID && $this->parentCategory === null) {
117-
// @phpstan-ignore assign.propertyType
118117
$this->parentCategory = new static($this->getDecoratedObject()->getParentCategory());
119118
}
120119

@@ -140,7 +139,6 @@ public static function getCategory($categoryID)
140139
{
141140
$category = CategoryHandler::getInstance()->getCategory($categoryID);
142141
if ($category) {
143-
// @phpstan-ignore return.type
144142
return new static($category);
145143
}
146144

wcfsetup/install/files/lib/data/smiley/category/SmileyCategory.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @copyright 2001-2019 WoltLab GmbH
1717
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1818
*
19-
* @phpstan-ignore missingType.generics
19+
* @implements ITraversableObject<Smiley>
2020
*/
2121
class SmileyCategory extends AbstractDecoratedCategory implements \Countable, ITraversableObject
2222
{

wcfsetup/install/files/lib/data/trophy/category/TrophyCategory.class.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
* @copyright 2001-2019 WoltLab GmbH
1818
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1919
* @since 3.1
20-
*
21-
* @method TrophyCategory[] getChildCategories()
22-
* @method TrophyCategory[] getAllChildCategories()
23-
* @method TrophyCategory getParentCategory()
24-
* @method TrophyCategory[] getParentCategories()
25-
* @method static TrophyCategory|null getCategory($categoryID)
2620
*/
2721
class TrophyCategory extends AbstractDecoratedCategory implements ITitledLinkObject
2822
{

wcfsetup/install/files/lib/system/form/builder/field/IFormField.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public function getSaveValue();
7676
* Returns the validation errors of this field.
7777
*
7878
* @return IFormFieldValidationError[] field validation errors
79-
* @phpstan-impure
8079
*/
8180
public function getValidationErrors();
8281

wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ protected function fetchElementData(\DOMElement $element, $saveData)
400400
} elseif (isset($descriptions[WCF::getLanguage()->getFixedLanguageCode()])) {
401401
$data['description'][$language->languageID] = $descriptions[WCF::getLanguage()->getFixedLanguageCode()];
402402
} else {
403-
// @phpstan-ignore variable.undefined
404403
$data['description'][$language->languageID] = \reset($descriptions);
405404
}
406405
}

0 commit comments

Comments
 (0)