From fac189e26a232dcbbb657d6fe2f761754c64c810 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 26 Jan 2013 20:00:09 +0100 Subject: [PATCH] The abstract declaration must precede the visibility declaration From phpcs Change-Id: I169c80a911ba75d64ab8a503088903ce3b8a7cca --- includes/Action.php | 14 +++++++------- includes/ExternalUser.php | 4 ++-- includes/Metadata.php | 2 +- includes/SpecialPage.php | 6 +++--- includes/api/ApiBase.php | 2 +- includes/api/ApiFormatBase.php | 2 +- includes/api/ApiQueryBase.php | 2 +- includes/api/ApiQueryORM.php | 2 +- includes/content/ContentHandler.php | 6 +++--- includes/db/Database.php | 4 ++-- includes/installer/DatabaseInstaller.php | 14 +++++++------- includes/installer/DatabaseUpdater.php | 2 +- includes/installer/Installer.php | 8 ++++---- includes/installer/WebInstallerPage.php | 4 ++-- includes/libs/GenericArrayObject.php | 2 +- includes/upload/UploadBase.php | 2 +- 16 files changed, 38 insertions(+), 38 deletions(-) diff --git a/includes/Action.php b/includes/Action.php index 82017632d4..c7ef4f6e49 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -255,7 +255,7 @@ abstract class Action { * Return the name of the action this object responds to * @return String lowercase */ - public abstract function getName(); + abstract public function getName(); /** * Get the permission required to perform this action. Often, but not always, @@ -350,13 +350,13 @@ abstract class Action { * $this->getOutput(), etc. * @throws ErrorPageError */ - public abstract function show(); + abstract public function show(); /** * Execute the action in a silent fashion: do not display anything or release any errors. * @return Bool whether execution was successful */ - public abstract function execute(); + abstract public function execute(); } /** @@ -368,7 +368,7 @@ abstract class FormAction extends Action { * Get an HTMLForm descriptor array * @return Array */ - protected abstract function getFormFields(); + abstract protected function getFormFields(); /** * Add pre- or post-text to the form @@ -425,14 +425,14 @@ abstract class FormAction extends Action { * @param $data Array * @return Bool|Array true for success, false for didn't-try, array of errors on failure */ - public abstract function onSubmit( $data ); + abstract public function onSubmit( $data ); /** * Do something exciting on successful processing of the form. This might be to show * a confirmation message (watch, rollback, etc) or to redirect somewhere else (edit, * protect, etc). */ - public abstract function onSuccess(); + abstract public function onSuccess(); /** * The basic pattern for actions is to display some sort of HTMLForm UI, maybe with @@ -508,7 +508,7 @@ abstract class FormlessAction extends Action { * @return String|null will be added to the HTMLForm if present, or just added to the * output if not. Return null to not add anything */ - public abstract function onView(); + abstract public function onView(); /** * We don't want an HTMLForm diff --git a/includes/ExternalUser.php b/includes/ExternalUser.php index 23944a5d01..13930a6e1e 100644 --- a/includes/ExternalUser.php +++ b/includes/ExternalUser.php @@ -128,7 +128,7 @@ abstract class ExternalUser { * @param $name string * @return bool Success? */ - protected abstract function initFromName( $name ); + abstract protected function initFromName( $name ); /** * Given an id, which was at some previous point in history returned by @@ -138,7 +138,7 @@ abstract class ExternalUser { * @param $id string * @return bool Success? */ - protected abstract function initFromId( $id ); + abstract protected function initFromId( $id ); /** * Try to magically initialize the user from cookies or similar information diff --git a/includes/Metadata.php b/includes/Metadata.php index 15894a472e..8a795ff743 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -34,7 +34,7 @@ abstract class RdfMetaData { $this->mArticle = $article; } - public abstract function show(); + abstract public function show(); protected function setup() { global $wgOut, $wgRequest; diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index da150c9e6e..374fbd1a96 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -863,7 +863,7 @@ abstract class FormSpecialPage extends SpecialPage { * Get an HTMLForm descriptor array * @return Array */ - protected abstract function getFormFields(); + abstract protected function getFormFields(); /** * Add pre- or post-text to the form @@ -921,13 +921,13 @@ abstract class FormSpecialPage extends SpecialPage { * @param $data Array * @return Bool|Array true for success, false for didn't-try, array of errors on failure */ - public abstract function onSubmit( array $data ); + abstract public function onSubmit( array $data ); /** * Do something exciting on successful processing of the form, most likely to show a * confirmation message */ - public abstract function onSuccess(); + abstract public function onSuccess(); /** * Basic SpecialPage workflow: get a form, send it to the user; get some data back, diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 78525e00f0..1741c915d0 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -105,7 +105,7 @@ abstract class ApiBase extends ContextSource { * The result data should be stored in the ApiResult object available * through getResult(). */ - public abstract function execute(); + abstract public function execute(); /** * Returns a string that identifies the version of the extending class. diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index e8edb3d7e0..5bbc62e109 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -58,7 +58,7 @@ abstract class ApiFormatBase extends ApiBase { * This method is not called if getIsHtml() returns true. * @return string */ - public abstract function getMimeType(); + abstract public function getMimeType(); /** * Whether this formatter needs raw data such as _element tags diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 02d071b7f0..2a8645f62d 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -623,5 +623,5 @@ abstract class ApiQueryGeneratorBase extends ApiQueryBase { * @param $resultPageSet ApiPageSet: All output should be appended to * this object */ - public abstract function executeGenerator( $resultPageSet ); + abstract public function executeGenerator( $resultPageSet ); } diff --git a/includes/api/ApiQueryORM.php b/includes/api/ApiQueryORM.php index f0c2b1b37e..41d8f11c70 100644 --- a/includes/api/ApiQueryORM.php +++ b/includes/api/ApiQueryORM.php @@ -35,7 +35,7 @@ abstract class ApiQueryORM extends ApiQueryBase { * * @return IORMTable */ - protected abstract function getTable(); + abstract protected function getTable(); /** * Returns the name of the individual rows. diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index ccc9b2c45c..0dc7455caa 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -413,7 +413,7 @@ abstract class ContentHandler { * @param $format null|String The desired serialization format * @return string Serialized form of the content */ - public abstract function serializeContent( Content $content, $format = null ); + abstract public function serializeContent( Content $content, $format = null ); /** * Unserializes a Content object of the type supported by this ContentHandler. @@ -424,7 +424,7 @@ abstract class ContentHandler { * @param $format null|String the format used for serialization * @return Content the Content object created by deserializing $blob */ - public abstract function unserializeContent( $blob, $format = null ); + abstract public function unserializeContent( $blob, $format = null ); /** * Creates an empty Content object of the type supported by this @@ -434,7 +434,7 @@ abstract class ContentHandler { * * @return Content */ - public abstract function makeEmptyContent(); + abstract public function makeEmptyContent(); /** * Creates a new Content object that acts as a redirect to the given page, diff --git a/includes/db/Database.php b/includes/db/Database.php index 62a3d872b7..3fe68221bf 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -811,7 +811,7 @@ abstract class DatabaseBase implements DatabaseType { * @since 1.20 * @return bool: Whether connection was closed successfully */ - protected abstract function closeConnection(); + abstract protected function closeConnection(); /** * @param $error String: fallback error message, used if none is given by DB @@ -833,7 +833,7 @@ abstract class DatabaseBase implements DatabaseType { * @param $sql String: SQL query. * @return ResultWrapper Result object to feed to fetchObject, fetchRow, ...; or false on failure */ - protected abstract function doQuery( $sql ); + abstract protected function doQuery( $sql ); /** * Determine whether a query writes to the DB. diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 75ede239b3..f27165d091 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -62,12 +62,12 @@ abstract class DatabaseInstaller { /** * Return the internal name, e.g. 'mysql', or 'sqlite'. */ - public abstract function getName(); + abstract public function getName(); /** * @return bool Returns true if the client library is compiled in. */ - public abstract function isCompiled(); + abstract public function isCompiled(); /** * Checks for installation prerequisites other than those checked by isCompiled() @@ -85,7 +85,7 @@ abstract class DatabaseInstaller { * * If this is called, $this->parent can be assumed to be a WebInstaller. */ - public abstract function getConnectForm(); + abstract public function getConnectForm(); /** * Set variables based on the request array, assuming it was submitted @@ -96,7 +96,7 @@ abstract class DatabaseInstaller { * * @return Status */ - public abstract function submitConnectForm(); + abstract public function submitConnectForm(); /** * Get HTML for a web form that retrieves settings used for installation. @@ -127,7 +127,7 @@ abstract class DatabaseInstaller { * * @return Status */ - public abstract function openConnection(); + abstract public function openConnection(); /** * Create the database and return a Status object indicating success or @@ -135,7 +135,7 @@ abstract class DatabaseInstaller { * * @return Status */ - public abstract function setupDatabase(); + abstract public function setupDatabase(); /** * Connect to the database using the administrative user/password currently @@ -218,7 +218,7 @@ abstract class DatabaseInstaller { * * @return String */ - public abstract function getLocalSettings(); + abstract public function getLocalSettings(); /** * Override this to provide DBMS-specific schema variables, to be diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index ac3f7b6991..9caf1688e1 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -575,7 +575,7 @@ abstract class DatabaseUpdater { * * @return Array */ - protected abstract function getCoreUpdateList(); + abstract protected function getCoreUpdateList(); /** * Append an SQL fragment to the open file handle. diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index c673f6fe9f..da351ca6db 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -313,19 +313,19 @@ abstract class Installer { * output format such as HTML or text before being sent to the user. * @param $msg */ - public abstract function showMessage( $msg /*, ... */ ); + abstract public function showMessage( $msg /*, ... */ ); /** * Same as showMessage(), but for displaying errors * @param $msg */ - public abstract function showError( $msg /*, ... */ ); + abstract public function showError( $msg /*, ... */ ); /** * Show a message to the installing user by using a Status object * @param $status Status */ - public abstract function showStatusMessage( Status $status ); + abstract public function showStatusMessage( Status $status ); /** * Constructor, always call this from child classes. @@ -927,7 +927,7 @@ abstract class Installer { * Helper function to be called from envCheckServer() * @return String */ - protected abstract function envGetDefaultServer(); + abstract protected function envGetDefaultServer(); /** * Environment check for setting $IP and $wgScriptPath. diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index f1340d79b7..52d493ff0d 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -36,7 +36,7 @@ abstract class WebInstallerPage { */ public $parent; - public abstract function execute(); + abstract public function execute(); /** * Constructor. @@ -1259,7 +1259,7 @@ class WebInstaller_Restart extends WebInstallerPage { abstract class WebInstaller_Document extends WebInstallerPage { - protected abstract function getFileName(); + abstract protected function getFileName(); public function execute() { $text = $this->getFileContents(); diff --git a/includes/libs/GenericArrayObject.php b/includes/libs/GenericArrayObject.php index 9b3e796e79..ef7587d8fe 100644 --- a/includes/libs/GenericArrayObject.php +++ b/includes/libs/GenericArrayObject.php @@ -41,7 +41,7 @@ abstract class GenericArrayObject extends ArrayObject { * * @return string */ - public abstract function getObjectType(); + abstract public function getObjectType(); /** * @see SiteList::getNewOffset() diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index b5c65e544e..a622630987 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -209,7 +209,7 @@ abstract class UploadBase { /** * Initialize from a WebRequest. Override this in a subclass. */ - public abstract function initializeFromRequest( &$request ); + abstract public function initializeFromRequest( &$request ); /** * Fetch the file. Usually a no-op -- 2.20.1