Jforrester has uploaded a new change for review.

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

Change subject: build: Enable phpcs rule 
'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment' and make pass
......................................................................

build: Enable phpcs rule 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment' 
and make pass

Change-Id: Ied1a479e6f5aa82d03e449ec10d655a921cd37e4
---
M Echo.php
M Resources.php
M includes/BatchRowUpdate.php
M includes/formatters/EchoFlyoutFormatter.php
M includes/formatters/EditUserTalkFormatter.php
M includes/mapper/NotificationMapper.php
M includes/model/Event.php
M includes/model/Notification.php
M phpcs.xml
M tests/phpunit/maintenance/SupressionMaintenanceTest.php
10 files changed, 13 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/74/249774/1

diff --git a/Echo.php b/Echo.php
index 07ec68c..ef2e0ed 100644
--- a/Echo.php
+++ b/Echo.php
@@ -245,14 +245,11 @@
 // extensions can define their own icons with the same structure.  It is 
recommended that
 // extensions prefix their icon key. An example is myextension-name.  This 
will help
 // avoid namespace conflicts.
-//
-// You can use either a path or a url, but not both.
-// The value of 'path' is relative to $wgExtensionAssetsPath.
-//
-// The value of 'url' should be a URL.
-//
-// You should customize the site icon URL, which is:
-// $wgEchoNotificationIcons['site']['url']
+// * You can use either a path or a url, but not both.
+//   The value of 'path' is relative to $wgExtensionAssetsPath.
+// * The value of 'url' should be a URL.
+// * You should customize the site icon URL, which is:
+//   $wgEchoNotificationIcons['site']['url']
 $wgEchoNotificationIcons = array(
        'placeholder' => array(
                'path' => "$echoIconPath/Generic.png",
@@ -382,7 +379,7 @@
                'group' => 'interactive',
                'section' => 'alert',
                // Commented out because EchoMentionPresentationModel fatals 
(T116888)
-               //'presentation-model' => 'EchoMentionPresentationModel',
+               // 'presentation-model' => 'EchoMentionPresentationModel',
                'formatter-class' => 'EchoMentionFormatter',
                'title-message' => 'notification-mention',
                'title-params' => array( 'agent', 'subject-anchor', 'title', 
'section-title', 'main-title-text' ),
diff --git a/Resources.php b/Resources.php
index 335c2f7..1e30139 100644
--- a/Resources.php
+++ b/Resources.php
@@ -101,7 +101,6 @@
                // Most extensions that require ext.echo.base actually need
                // the logger. They will have to be adjusted to use the new
                // logger functionality, however.
-               //
                // This module is mainly here to make sure other extensions
                // that rely on ext.echo.base don't explode, and that CI lets
                // us merge this while fixing the main extensions that require
diff --git a/includes/BatchRowUpdate.php b/includes/BatchRowUpdate.php
index d18486f..1a92b93 100644
--- a/includes/BatchRowUpdate.php
+++ b/includes/BatchRowUpdate.php
@@ -193,8 +193,8 @@
                $this->db->begin();
 
                foreach ( $updates as $update ) {
-                       //echo "Updating: ";var_dump( $update['primaryKey'] );
-                       //echo "With values: ";var_dump( $update['changes'] );
+                       // echo "Updating: ";var_dump( $update['primaryKey'] );
+                       // echo "With values: ";var_dump( $update['changes'] );
                        $this->db->update(
                                $this->table,
                                $update['changes'],
diff --git a/includes/formatters/EchoFlyoutFormatter.php 
b/includes/formatters/EchoFlyoutFormatter.php
index ef02dd6..7d013cc 100644
--- a/includes/formatters/EchoFlyoutFormatter.php
+++ b/includes/formatters/EchoFlyoutFormatter.php
@@ -28,7 +28,7 @@
                                $model->getHeaderMessage()->parse()
                        ) . "\n";
 
-               //@todo body text
+               // @todo body text
 
                $ts = $this->language->getHumanTimestamp(
                        new MWTimestamp( $event->getTimestamp() ),
diff --git a/includes/formatters/EditUserTalkFormatter.php 
b/includes/formatters/EditUserTalkFormatter.php
index 2b5aaa2..fa4fa3c 100644
--- a/includes/formatters/EditUserTalkFormatter.php
+++ b/includes/formatters/EditUserTalkFormatter.php
@@ -15,7 +15,6 @@
                // on your talk page in "xxxx"' if
                // * the message is not bundled and
                // * there is a section title
-               //
                // We could go with the approach of creating a new notification 
type, but
                // * this is variant is too small to introduce a new type
                // * may not fall back to default for talk page post with 
oversighted content
diff --git a/includes/mapper/NotificationMapper.php 
b/includes/mapper/NotificationMapper.php
index dc8c023..b35a88d 100644
--- a/includes/mapper/NotificationMapper.php
+++ b/includes/mapper/NotificationMapper.php
@@ -157,7 +157,6 @@
                // notifications.  We should have some cron job to remove old 
notifications so
                // the notification volume is in a reasonable amount for such 
case.  The other option
                // is to denormalize notification table with event_type and 
lookup index.
-               //
                // Look for notifications with base = 1
                $conds = array(
                        'notification_user' => $user->getID(),
diff --git a/includes/model/Event.php b/includes/model/Event.php
index 77d9659..33ef41a 100644
--- a/includes/model/Event.php
+++ b/includes/model/Event.php
@@ -143,7 +143,7 @@
                        return false;
                }
 
-               //@Todo - Database insert logic should not be inside the model
+               // @Todo - Database insert logic should not be inside the model
                $obj->insert();
 
                Hooks::run( 'EchoEventInsertComplete', array( $obj ) );
diff --git a/includes/model/Notification.php b/includes/model/Notification.php
index 50b4f40..326fd29 100644
--- a/includes/model/Notification.php
+++ b/includes/model/Notification.php
@@ -90,7 +90,7 @@
                        $obj->timestamp = wfTimestampNow();
                }
 
-               //@Todo - Database insert logic should not be inside the model
+               // @Todo - Database insert logic should not be inside the model
                $obj->insert();
 
                return $obj;
diff --git a/phpcs.xml b/phpcs.xml
index f2a1c05..0f5b7a9 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,7 +6,6 @@
                <exclude 
name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix"/>
                <exclude 
name="MediaWiki.VariableAnalysis.UnusedGlobalVariables"/>
                <exclude 
name="MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect"/>
-               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment"/>
                <exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing"/>
                <exclude name="PSR2.Classes.PropertyDeclaration.VarUsed"/>
                <exclude 
name="PSR2.Methods.MethodDeclaration.AbstractAfterVisibility"/>
diff --git a/tests/phpunit/maintenance/SupressionMaintenanceTest.php 
b/tests/phpunit/maintenance/SupressionMaintenanceTest.php
index d74de66..6269e2a 100644
--- a/tests/phpunit/maintenance/SupressionMaintenanceTest.php
+++ b/tests/phpunit/maintenance/SupressionMaintenanceTest.php
@@ -69,7 +69,7 @@
                                array( // expected update
                                        'event_extra' => serialize( array( 
'link-from-page-id' => 99 ) ),
                                ),
-                               array( //input row
+                               array( // input row
                                        'event_type' => 'page-linked',
                                        'event_extra' => serialize( array(
                                                'link-from-title' => 'Horse',
@@ -85,7 +85,7 @@
                                        'event_extra' => serialize( array( 
'link-from-page-id' => 8675309 ) ),
                                        'event_page_id' => 8675309,
                                ),
-                               array( //input row
+                               array( // input row
                                        'event_type' => 'page-linked',
                                        'event_extra' => serialize( array(
                                                'link-from-title' => 'Jenny',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied1a479e6f5aa82d03e449ec10d655a921cd37e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>

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

Reply via email to