From: jenkins-bot Date: Fri, 5 Apr 2019 23:02:04 +0000 (+0000) Subject: Merge "Fixes LocalFile isMissing always returning true" X-Git-Tag: 1.34.0-rc.0~2139 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=bafee300f6200198246dbc645dcb57108c744cbd;hp=bf29eadf3ea4bcaff236c15b3ee7315cdf186da2;p=lhc%2Fweb%2Fwiklou.git Merge "Fixes LocalFile isMissing always returning true" --- diff --git a/.phan/config.php b/.phan/config.php index e4ba47f265..2c0035ea04 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -115,38 +115,28 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [ "PhanTypeComparisonFromArray", // approximate error count: 2 "PhanTypeComparisonToArray", - // approximate error count: 1 - "PhanTypeConversionFromArray", // approximate error count: 2 "PhanTypeExpectedObjectOrClassName", // approximate error count: 7 "PhanTypeExpectedObjectPropAccess", // approximate error count: 3 "PhanTypeInstantiateAbstract", - // approximate error count: 1 - "PhanTypeInvalidCallableArraySize", // approximate error count: 62 "PhanTypeInvalidDimOffset", // approximate error count: 10 "PhanTypeInvalidExpressionArrayDestructuring", - // approximate error count: 1 - "PhanTypeInvalidLeftOperand", // approximate error count: 7 "PhanTypeInvalidLeftOperandOfIntegerOp", // approximate error count: 2 "PhanTypeInvalidRightOperand", // approximate error count: 2 "PhanTypeInvalidRightOperandOfIntegerOp", - // approximate error count: 1 - "PhanTypeMagicVoidWithReturn", // approximate error count: 152 "PhanTypeMismatchArgument", // approximate error count: 28 "PhanTypeMismatchArgumentInternal", // approximate error count: 1 "PhanTypeMismatchBitwiseBinaryOperands", - // approximate error count: 1 - "PhanTypeMismatchDeclaredParam", // approximate error count: 2 "PhanTypeMismatchDimEmpty", // approximate error count: 29 @@ -177,10 +167,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/Revision/RevisionStore.php b/includes/Revision/RevisionStore.php index 2a54a9b187..0329bd1587 100644 --- a/includes/Revision/RevisionStore.php +++ b/includes/Revision/RevisionStore.php @@ -1670,6 +1670,7 @@ class RevisionStore ) { if ( !$this->hasMcrSchemaFlags( SCHEMA_COMPAT_READ_NEW ) ) { $mainSlot = $this->emulateMainSlot_1_29( $revisionRow, $queryFlags, $title ); + // @phan-suppress-next-line PhanTypeInvalidCallableArraySize false positive $slots = new RevisionSlots( [ SlotRecord::MAIN => $mainSlot ] ); } else { // XXX: do we need the same kind of caching here diff --git a/includes/api/ApiContinuationManager.php b/includes/api/ApiContinuationManager.php index 7da8ed9a5b..e4c52dd381 100644 --- a/includes/api/ApiContinuationManager.php +++ b/includes/api/ApiContinuationManager.php @@ -217,6 +217,8 @@ class ApiContinuationManager { // Some modules are unfinished: include those params, and copy // the generator params. foreach ( $continuationData as $module => $kvp ) { + // XXX: Not sure why phan is complaining here... + // @phan-suppress-next-line PhanTypeInvalidLeftOperand $data += $kvp; } $generatorParams = []; 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; diff --git a/includes/libs/rdbms/ChronologyProtector.php b/includes/libs/rdbms/ChronologyProtector.php index 3e71e3626b..62a296827d 100644 --- a/includes/libs/rdbms/ChronologyProtector.php +++ b/includes/libs/rdbms/ChronologyProtector.php @@ -72,7 +72,7 @@ class ChronologyProtector implements LoggerAwareInterface { /** * @param BagOStuff $store - * @param array[] $client Map of (ip: , agent: [, clientId: ] ) + * @param array $client Map of (ip: , agent: [, clientId: ] ) * @param int|null $posIndex Write counter index [optional] * @since 1.27 */ diff --git a/includes/libs/rdbms/encasing/MssqlBlob.php b/includes/libs/rdbms/encasing/MssqlBlob.php index 8e68aba0d7..6ad934acc4 100644 --- a/includes/libs/rdbms/encasing/MssqlBlob.php +++ b/includes/libs/rdbms/encasing/MssqlBlob.php @@ -7,6 +7,7 @@ class MssqlBlob extends Blob { /** * @param string $data + * @suppress PhanTypeMagicVoidWithReturn */ public function __construct( $data ) { if ( $data instanceof MssqlBlob ) { diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 4b0e503ec4..655fa2711f 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2997,7 +2997,7 @@ class WikiPage implements Page, IDBAccessObject { * @param Content|null $content Page content to be used when determining * the required updates. This may be needed because $this->getContent() * may already return null when the page proper was deleted. - * @param RevisionRecord|Revision|null $revision The current page revision at the time of + * @param Revision|null $revision The current page revision at the time of * deletion, used when determining the required updates. This may be needed because * $this->getRevision() may already return null when the page proper was deleted. * @param User|null $user The user that caused the deletion