From 7f76ef9924713d69eca21f5807684fd360020c6e Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Tue, 28 May 2019 21:00:23 +0200 Subject: [PATCH] Add phan Change-Id: If382ed4440aa96dcb32a8aba6726cc7e78f0e0a7 --- .phan/config.php | 29 ++++++++++++++++++++++++++++ composer.json | 3 ++- includes/specials/SpecialCaptcha.php | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .phan/config.php diff --git a/.phan/config.php b/.phan/config.php new file mode 100644 index 000000000..68b2b3ac7 --- /dev/null +++ b/.phan/config.php @@ -0,0 +1,29 @@ +ConfirmEdit_ActivateCaptcha +$cfg['suppress_issue_types'][] = 'PhanUndeclaredProperty'; + +return $cfg; diff --git a/composer.json b/composer.json index 8d8396094..b8be2a73b 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,8 @@ "jakub-onderka/php-parallel-lint": "1.0.0", "mediawiki/mediawiki-codesniffer": "24.0.0", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/minus-x": "0.3.1" + "mediawiki/minus-x": "0.3.1", + "mediawiki/mediawiki-phan-config": "0.6.0" }, "scripts": { "test": [ diff --git a/includes/specials/SpecialCaptcha.php b/includes/specials/SpecialCaptcha.php index 39b8f7aa5..2a66f7bb2 100644 --- a/includes/specials/SpecialCaptcha.php +++ b/includes/specials/SpecialCaptcha.php @@ -14,6 +14,7 @@ class SpecialCaptcha extends UnlistedSpecialPage { case "image": if ( method_exists( $instance, 'showImage' ) ) { // @todo: Do this in a more OOP way + /** @phan-suppress-next-line PhanUndeclaredMethod */ return $instance->showImage(); } case "help":