mediawiki-extensions-Confir.../includes/Specials/SpecialCaptcha.php
Reedy 48a60aa762 Various minor code cleanup
Change-Id: I75f34c66f1c1968cfb9a3e1932068ec2420e0fa6
2024-10-30 01:48:33 +00:00

29 lines
630 B
PHP

<?php
namespace MediaWiki\Extension\ConfirmEdit\Specials;
use MediaWiki\Extension\ConfirmEdit\Hooks;
use MediaWiki\SpecialPage\UnlistedSpecialPage;
class SpecialCaptcha extends UnlistedSpecialPage {
public function __construct() {
parent::__construct( 'Captcha' );
}
/** @inheritDoc */
public function execute( $par ) {
$this->setHeaders();
$instance = Hooks::getInstance();
if ( $par === 'image' && method_exists( $instance, 'showImage' ) ) {
// @todo: Do this in a more OOP way
/** @phan-suppress-next-line PhanUndeclaredMethod */
$instance->showImage();
return;
}
$instance->showHelp();
}
}