Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/52904


Change subject: Remove unused variables.
......................................................................

Remove unused variables.

Minor doc additions

Remove double newlines

Change-Id: I99f14bfac891120fa20f2a6b306a58c049550146
---
M EventLogging.hooks.php
M EventLogging.php
M includes/JsonSchema.php
M includes/JsonSchemaContent.php
M includes/JsonSchemaHooks.php
5 files changed, 5 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/04/52904/1

diff --git a/EventLogging.hooks.php b/EventLogging.hooks.php
index 1fc5ff3..8a94355 100644
--- a/EventLogging.hooks.php
+++ b/EventLogging.hooks.php
@@ -38,6 +38,7 @@
        /**
         * @param $user object: The User object that was created.
         * @param $byEmail boolean The form has a [By e-mail] button.
+        * @return bool True
         */
        public static function onAddNewAccount( $user, $byEmail ) {
                global $wgRequest, $wgUser;
@@ -76,7 +77,6 @@
                return true;
        }
 
-
        /**
         * Log server-side event on successful page edit.
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
@@ -95,7 +95,6 @@
                return true;
        }
 
-
        /**
         * @param array &$vars
         * @return bool
@@ -106,7 +105,6 @@
                $vars[ 'wgEventLoggingBaseUri' ] = $wgEventLoggingBaseUri;
                return true;
        }
-
 
        /**
         * @param array &$testModules
diff --git a/EventLogging.php b/EventLogging.php
index d5cb105..849f3de 100644
--- a/EventLogging.php
+++ b/EventLogging.php
@@ -97,7 +97,7 @@
  * @return bool: Whether the event was logged.
  */
 function efLogServerSideEvent( $schemaName, $revId, $event ) {
-       global $wgDBname, $wgEventLoggingFile, $wgEventLoggingLogSHA1;
+       global $wgDBname, $wgEventLoggingFile;
 
        if ( !$wgEventLoggingFile ) {
                return false;
diff --git a/includes/JsonSchema.php b/includes/JsonSchema.php
index 60e6052..e9f6186 100644
--- a/includes/JsonSchema.php
+++ b/includes/JsonSchema.php
@@ -499,7 +499,7 @@
                $nodetype = $schemanode['type'];
                switch( $nodetype ) {
                        case 'object':
-                               foreach ( $schemanode['properties'] as $key => 
$value ) {
+                               foreach ( $schemanode['properties'] as $value ) 
{
                                        $this->indexSubtree( $value );
                                }
 
diff --git a/includes/JsonSchemaContent.php b/includes/JsonSchemaContent.php
index a9bd7b2..840ee10 100644
--- a/includes/JsonSchemaContent.php
+++ b/includes/JsonSchemaContent.php
@@ -19,7 +19,6 @@
                parent::__construct( $text, 'JsonSchema' );
        }
 
-
        /**
         * @throws JsonSchemaException: If invalid.
         * @return bool: True if valid.
@@ -32,7 +31,6 @@
                return efSchemaValidate( $schema );
        }
 
-
        /**
         * @return bool: Whether content is valid JSON Schema.
         */
@@ -44,7 +42,6 @@
                }
        }
 
-
        /**
         * Beautifies JSON prior to save.
         * @param Title $title Title
@@ -55,7 +52,6 @@
        function preSaveTransform( Title $title, User $user, ParserOptions 
$popts ) {
                return new JsonSchemaContent( efBeautifyJson( 
$this->getNativeData() ) );
        }
-
 
        /**
         * Constructs an HTML representation of a JSON object.
@@ -71,7 +67,6 @@
                        Xml::tags( 'tbody', array(), join( "\n", $rows ) )
                );
        }
-
 
        /**
         * Constructs HTML representation of a single key-value pair.
@@ -94,7 +89,6 @@
                return Xml::tags( 'tr', array(), $th . $td );
        }
 
-
        /**
         * Generate generic PHP and JavaScript code strings showing how to
         * use a schema.
@@ -114,7 +108,6 @@
                                "mw.eventLog.logEvent( '{$dbKey}', { /* ... */ 
} );"
                );
        }
-
 
        /**
         * Wraps HTML representation of content.
@@ -151,7 +144,6 @@
 
                return $out;
        }
-
 
        /**
         * Generates HTML representation of content.
diff --git a/includes/JsonSchemaHooks.php b/includes/JsonSchemaHooks.php
index 8854000..ad5e402 100644
--- a/includes/JsonSchemaHooks.php
+++ b/includes/JsonSchemaHooks.php
@@ -33,7 +33,6 @@
                return false;
        }
 
-
        /**
         * Declares JSON as the code editor language for Schema: pages.
         * This hook only runs if the CodeEditor extension is enabled.
@@ -48,14 +47,13 @@
                return true;
        }
 
-
        /**
         * Registers Schema namespaces and assign edit rights.
         * @param array &$namespaces: Mapping of numbers to namespace names.
         * @return bool
         */
        static function onCanonicalNamespaces( array &$namespaces ) {
-               global $wgGroupPermissions, $wgNamespaceContentModels, 
$wgNamespaceProtection;
+               global $wgNamespaceContentModels, $wgNamespaceProtection;
 
                $namespaces[ NS_SCHEMA ] = 'Schema';
                $namespaces[ NS_SCHEMA_TALK ] = 'Schema_talk';
@@ -66,7 +64,6 @@
                return true;
        }
 
-
        /**
         * Validates that the revised contents are valid JSON.
         * If not valid, rejects edit with error message.
@@ -74,6 +71,7 @@
         * @param string $text: Content of the revised article.
         * @param string &$error: Error message to return.
         * @param string $summary: Edit summary provided for edit.
+        * @return True
         */
        static function onEditFilterMerged( $editor, $text, &$error, $summary ) 
{
                if ( $editor->getTitle()->getNamespace() !== NS_SCHEMA ) {
@@ -90,7 +88,6 @@
 
                return true;
        }
-
 
        /**
         * Adds CSS for pretty-printing schema on NS_SCHEMA pages.

-- 
To view, visit https://gerrit.wikimedia.org/r/52904
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99f14bfac891120fa20f2a6b306a58c049550146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to