From 49c0e843b31418565aa515bf85a5d10d883105f8 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 21 Mar 2019 18:42:46 -0700 Subject: [PATCH] Fix PhanUndeclaredType* errors (#3) Change-Id: I09420688dcd7dd7ba9dd17b189805a6f3f15f6fd --- .phan/config.php | 4 ---- includes/block/BlockRestriction.php | 1 + includes/filerepo/file/ForeignAPIFile.php | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index e4ba47f265..27ba0c9457 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -177,10 +177,6 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [ "PhanUndeclaredMethod", // approximate error count: 847 "PhanUndeclaredProperty", - // approximate error count: 1 - "PhanUndeclaredTypeReturnType", - // approximate error count: 3 - "PhanUndeclaredTypeThrowsType", // approximate error count: 2 "PhanUndeclaredVariableAssignOp", // approximate error count: 55 diff --git a/includes/block/BlockRestriction.php b/includes/block/BlockRestriction.php index cbd30c2c6f..2e8752e450 100644 --- a/includes/block/BlockRestriction.php +++ b/includes/block/BlockRestriction.php @@ -25,6 +25,7 @@ namespace MediaWiki\Block; use MediaWiki\Block\Restriction\NamespaceRestriction; use MediaWiki\Block\Restriction\PageRestriction; use MediaWiki\Block\Restriction\Restriction; +use MWException; use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; diff --git a/includes/filerepo/file/ForeignAPIFile.php b/includes/filerepo/file/ForeignAPIFile.php index 3a75720cdf..ab8ef2f8de 100644 --- a/includes/filerepo/file/ForeignAPIFile.php +++ b/includes/filerepo/file/ForeignAPIFile.php @@ -154,7 +154,7 @@ class ForeignAPIFile extends File { /** * @param int $page - * @return int|number + * @return int */ public function getWidth( $page = 1 ) { return isset( $this->mInfo['width'] ) ? intval( $this->mInfo['width'] ) : 0; -- 2.20.1