Change-Id: If382ed4440aa96dcb32a8aba6726cc7e78f0e0a7
This commit is contained in:
Umherirrender 2019-05-28 21:00:23 +02:00
parent e50998ef40
commit 7f76ef9924
3 changed files with 32 additions and 1 deletions

29
.phan/config.php Normal file
View file

@ -0,0 +1,29 @@
<?php
$cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
$cfg['directory_list'] = array_merge(
$cfg['directory_list'],
[
'FancyCaptcha/',
'MathCaptcha/',
'QuestyCaptcha/',
'ReCaptchaNoCaptcha/',
'ReCaptcha/',
'SimpleCaptcha/',
'../../extensions/Math',
]
);
$cfg['exclude_analysis_directory_list'] = array_merge(
$cfg['exclude_analysis_directory_list'],
[
'ReCaptcha/includes/recaptchalib.php',
'../../extensions/Math',
]
);
// WikiPage->ConfirmEdit_ActivateCaptcha
$cfg['suppress_issue_types'][] = 'PhanUndeclaredProperty';
return $cfg;

View file

@ -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": [

View file

@ -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":