Make ApiQueryUserInfo::getBlockInfo accept an AbstractBlock
authorThalia <thalia.e.chan@googlemail.com>
Mon, 13 May 2019 14:20:38 +0000 (15:20 +0100)
committerThalia <thalia.e.chan@googlemail.com>
Mon, 13 May 2019 14:20:38 +0000 (15:20 +0100)
This method was removed (I84ed216) before the Block class was
refactored (I83bceb5) and restored (If47a938) after the refactor.

After the refactor, this method should accept and AbstractBlock,
so it can handle a SystemBlock as well as a database Block.

Change-Id: Ice8a2e7c19e88406229bd836a45f377abdb72fb6

includes/api/ApiQueryUserInfo.php

index d73fbc4..ba7280d 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  */
 
+use MediaWiki\Block\AbstractBlock;
 use MediaWiki\MediaWikiServices;
 
 /**
@@ -56,10 +57,10 @@ class ApiQueryUserInfo extends ApiQueryBase {
         * Get basic info about a given block
         *
         * @deprecated since 1.34 Use ApiBlockInfoTrait::getBlockDetails() instead.
-        * @param Block $block
+        * @param AbstractBlock $block
         * @return array See ApiBlockInfoTrait::getBlockDetails
         */
-       public static function getBlockInfo( Block $block ) {
+       public static function getBlockInfo( AbstractBlock $block ) {
                wfDeprecated( __METHOD__, '1.34' );
 
                // Hack to access a private method from a trait: