From: Daimona Eaytoy Date: Wed, 11 Sep 2019 09:30:12 +0000 (+0200) Subject: Declare dynamic properties X-Git-Tag: 1.34.0-rc.0~215^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=290ab29617d830d20cdc72cb9e5e199f5e091d9d;p=lhc%2Fweb%2Fwiklou.git Declare dynamic properties This is for classes with a single undeclared property - aside from BlockManager: I3f51fd3579514b83b567dfe20926df2f0930dc85 removed the declaration of $permissionManager without actually removing all uses. Change-Id: Ic2a95f77071312041be6e0633ea9b5325e98de42 --- diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index d21f1119aa..a6b15e997b 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -41,6 +41,9 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { private $redirect; private $bl_ns, $bl_from, $bl_from_ns, $bl_table, $bl_code, $bl_title, $bl_fields, $hasNS; + /** @var string */ + private $helpUrl; + /** * Maps ns and title to pageid * diff --git a/includes/block/BlockManager.php b/includes/block/BlockManager.php index 2e20529bc8..0cf5eb4b3d 100644 --- a/includes/block/BlockManager.php +++ b/includes/block/BlockManager.php @@ -41,6 +41,12 @@ use Wikimedia\IPSet; * @since 1.34 Refactored from User and Block. */ class BlockManager { + /** @var PermissionManager */ + private $permissionManager; + + /** @var ServiceOptions */ + private $options; + /** * TODO Make this a const when HHVM support is dropped (T192166) * diff --git a/includes/collation/CustomUppercaseCollation.php b/includes/collation/CustomUppercaseCollation.php index 170d5c2c69..8f4f058646 100644 --- a/includes/collation/CustomUppercaseCollation.php +++ b/includes/collation/CustomUppercaseCollation.php @@ -45,6 +45,9 @@ class CustomUppercaseCollation extends NumericUppercaseCollation { /** @var array $puaSubset List of private use area codes */ private $puaSubset; + /** @var array */ + private $firstLetters; + /** * @note This assumes $alphabet does not contain U+F3000-U+F3FFF * diff --git a/includes/debug/logger/ConsoleLogger.php b/includes/debug/logger/ConsoleLogger.php index a48faf1e50..56fc0b32bc 100644 --- a/includes/debug/logger/ConsoleLogger.php +++ b/includes/debug/logger/ConsoleLogger.php @@ -10,6 +10,9 @@ use Psr\Log\AbstractLogger; * goal. */ class ConsoleLogger extends AbstractLogger { + /** @var string */ + private $channel; + /** * @param string $channel */ diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 42e78fffc6..ff8f0563fb 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -142,6 +142,12 @@ class FileRepo { /** @var WANObjectCache */ protected $wanCache; + /** + * @var string + * @protected Use $this->getName(). Public for back-compat only + */ + public $name; + /** * @param array|null $info * @throws MWException diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index 17fa146440..b4fd176143 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -94,6 +94,9 @@ class ArchivedFile { /** @var Title */ protected $title; # image title + /** @var bool */ + private $exists; + /** * @throws MWException * @param Title $title diff --git a/includes/htmlform/fields/HTMLSelectAndOtherField.php b/includes/htmlform/fields/HTMLSelectAndOtherField.php index 354432bb28..05ab0bb3fa 100644 --- a/includes/htmlform/fields/HTMLSelectAndOtherField.php +++ b/includes/htmlform/fields/HTMLSelectAndOtherField.php @@ -11,6 +11,9 @@ * @todo FIXME: If made 'required', only the text field should be compulsory. */ class HTMLSelectAndOtherField extends HTMLSelectField { + /** @var string[] */ + private $mFlatOptions; + public function __construct( $params ) { if ( array_key_exists( 'other', $params ) ) { // Do nothing diff --git a/includes/http/MWCallbackStream.php b/includes/http/MWCallbackStream.php index a4120a3578..13ab9b7caf 100644 --- a/includes/http/MWCallbackStream.php +++ b/includes/http/MWCallbackStream.php @@ -29,6 +29,7 @@ use GuzzleHttp\Psr7\StreamDecoratorTrait; * * @private for use by GuzzleHttpRequest only * @since 1.33 + * @property StreamInterface $stream Defined in StreamDecoratorTrait via @property, not read by phan */ class MWCallbackStream implements StreamInterface { use StreamDecoratorTrait; diff --git a/includes/import/ImportStreamSource.php b/includes/import/ImportStreamSource.php index 2f8f5dda14..81e414e931 100644 --- a/includes/import/ImportStreamSource.php +++ b/includes/import/ImportStreamSource.php @@ -30,6 +30,9 @@ use MediaWiki\MediaWikiServices; * @ingroup SpecialPage */ class ImportStreamSource implements ImportSource { + /** @var resource */ + private $mHandle; + /** * @param resource $handle */ diff --git a/includes/installer/InstallDocFormatter.php b/includes/installer/InstallDocFormatter.php index 08cfd8689a..eb96e05941 100644 --- a/includes/installer/InstallDocFormatter.php +++ b/includes/installer/InstallDocFormatter.php @@ -21,6 +21,9 @@ */ class InstallDocFormatter { + /** @var string */ + private $text; + public static function format( $text ) { $obj = new self( $text ); diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index a2179c6e7f..6921361423 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -30,6 +30,7 @@ class LocalSettingsGenerator { protected $extensions = []; + protected $skins = []; protected $values = []; protected $groupPermissions = []; protected $dbSettings = ''; diff --git a/includes/media/DjVuImage.php b/includes/media/DjVuImage.php index 92fad528fe..50b13a413f 100644 --- a/includes/media/DjVuImage.php +++ b/includes/media/DjVuImage.php @@ -42,6 +42,9 @@ class DjVuImage { */ const DJVUTXT_MEMORY_LIMIT = 300000; + /** @var string */ + private $mFilename; + /** * @param string $filename The DjVu file name. */