From: Kunal Mehta Date: Fri, 22 Mar 2019 01:42:46 +0000 (-0700) Subject: Fix PhanUndeclaredType* errors (#3) X-Git-Tag: 1.34.0-rc.0~2141^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=49c0e843b31418565aa515bf85a5d10d883105f8;p=lhc%2Fweb%2Fwiklou.git Fix PhanUndeclaredType* errors (#3) Change-Id: I09420688dcd7dd7ba9dd17b189805a6f3f15f6fd --- 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;