From 92c432ab830a1b3c9b696f086fc2f7a883f7e423 Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Sat, 2 Feb 2019 10:05:09 +0100 Subject: [PATCH] Remove "return true" legacy behavior from hook handler functions Change-Id: Ie33721116c5ae665f45ed0a8baeace031cfeca89 --- includes/CodeEditorHooks.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/CodeEditorHooks.php b/includes/CodeEditorHooks.php index 57bf29bb..7f9a9d09 100644 --- a/includes/CodeEditorHooks.php +++ b/includes/CodeEditorHooks.php @@ -31,20 +31,18 @@ class CodeEditorHooks { /** * @param User $user * @param array &$defaultPreferences - * @return true */ public static function getPreferences( User $user, &$defaultPreferences ) { $defaultPreferences['usecodeeditor'] = [ 'type' => 'api', 'default' => '1', ]; - return true; } /** * @param EditPage $editpage * @param OutputPage $output - * @return true + * @throws ErrorPageError */ public static function editPageShowEditFormInitial( EditPage $editpage, OutputPage $output ) { $title = $editpage->getContextTitle(); @@ -58,6 +56,5 @@ class CodeEditorHooks { } elseif ( !ExtensionRegistry::getInstance()->isLoaded( "WikiEditor" ) ) { throw new ErrorPageError( "codeeditor-error-title", "codeeditor-error-message" ); } - return true; } }