Remove return value from FormSpecialPage::checkExecutePermissions
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 4 Oct 2015 20:22:01 +0000 (13:22 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 4 Oct 2015 20:22:05 +0000 (13:22 -0700)
It is unused and few callers comply with it

Change-Id: I3ac02ca996b57bf2222006712cc988a064dc38e5

includes/specialpage/FormSpecialPage.php
includes/specials/SpecialPasswordReset.php

index 42c5980..d22875b 100644 (file)
@@ -169,7 +169,6 @@ abstract class FormSpecialPage extends SpecialPage {
         * Failures here must throw subclasses of ErrorPageError.
         * @param User $user
         * @throws UserBlockedError
-        * @return bool True
         */
        protected function checkExecutePermissions( User $user ) {
                $this->checkPermissions();
@@ -182,8 +181,6 @@ abstract class FormSpecialPage extends SpecialPage {
                if ( $this->requiresWrite() ) {
                        $this->checkReadOnly();
                }
-
-               return true;
        }
 
        /**
index 9e72807..f1eb8c2 100644 (file)
@@ -58,7 +58,7 @@ class SpecialPasswordReset extends FormSpecialPage {
                        throw new ErrorPageError( 'internalerror', 'resetpass_forbidden' );
                }
 
-               return parent::checkExecutePermissions( $user );
+               parent::checkExecutePermissions( $user );
        }
 
        protected function getFormFields() {