Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
SpecialCaptcha | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
execute | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\ConfirmEdit\Specials; |
4 | |
5 | use MediaWiki\Extension\ConfirmEdit\Hooks; |
6 | use MediaWiki\SpecialPage\UnlistedSpecialPage; |
7 | |
8 | class SpecialCaptcha extends UnlistedSpecialPage { |
9 | public function __construct() { |
10 | parent::__construct( 'Captcha' ); |
11 | } |
12 | |
13 | /** |
14 | * @inheritDoc |
15 | */ |
16 | public function execute( $par ) { |
17 | $this->setHeaders(); |
18 | |
19 | $instance = Hooks::getInstance(); |
20 | |
21 | if ( $par === 'image' && method_exists( $instance, 'showImage' ) ) { |
22 | // @todo: Do this in a more OOP way |
23 | /** @phan-suppress-next-line PhanUndeclaredMethod */ |
24 | $instance->showImage(); |
25 | return; |
26 | } |
27 | |
28 | $instance->showHelp(); |
29 | } |
30 | } |