diff --git a/phpBB/phpbb/captcha/plugins/incomplete.php b/phpBB/phpbb/captcha/plugins/incomplete.php index 9669931761..5c2b7f9a66 100644 --- a/phpBB/phpbb/captcha/plugins/incomplete.php +++ b/phpBB/phpbb/captcha/plugins/incomplete.php @@ -1,48 +1,108 @@ + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ namespace phpbb\captcha\plugins; use phpbb\config\config; use phpbb\template\template; -class incomplete extends \phpbb\captcha\plugins\captcha_abstract +class incomplete extends captcha_abstract { + /** + * Constructor for incomplete captcha + * + * @param config $config + * @param template $template + * @param string $phpbb_root_path + * @param string $phpEx + */ public function __construct(protected config $config, protected template $template, protected string $phpbb_root_path, protected string $phpEx) {} - public function is_available() + /** + * @return bool True if captcha is available, false if not + */ + public function is_available(): bool { return true; } + /** + * Dummy implementation + * + * @return void + */ public function get_generator_class() { } - public static function get_name() + /** + * Get CAPTCHA name language variable + * + * @return string Language variable + */ + public static function get_name(): string { return 'CAPTCHA_INCOMPLETE'; } + /** + * Init CAPTCHA + * + * @param int $type CAPTCHA type + * @return void + */ public function init($type) { } + /** + * Execute demo + * + * @return void + */ public function execute_demo() { } + /** + * Execute CAPTCHA + * + * @return void + */ public function execute() { } - public function get_demo_template($id) + /** + * Get template data for demo + * + * @param int|string $id ACP module ID + * + * @return string Demo template file name + */ + public function get_demo_template($id): string { return ''; } - public function get_template() + /** + * Get template data for CAPTCHA + * + * @return string CAPTCHA template file name + */ + public function get_template(): string { $contact_link = phpbb_get_board_contact_link($this->config, $this->phpbb_root_path, $this->phpEx); @@ -54,13 +114,23 @@ class incomplete extends \phpbb\captcha\plugins\captcha_abstract return 'captcha_incomplete.html'; } - public function validate() + /** + * Validate CAPTCHA + * + * @return false Incomplete CAPTCHA will never validate + */ + public function validate(): bool { return false; } - public function is_solved() + /** + * Check whether CAPTCHA is solved + * + * @return false Incomplete CAPTCHA will never be solved + */ + public function is_solved(): bool { return false; } -} \ No newline at end of file +}