mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 18:30:06 +00:00
build: Enable phpcs rule 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment' and make pass
Change-Id: Ied1a479e6f5aa82d03e449ec10d655a921cd37e4
This commit is contained in:
parent
852ddaf903
commit
cd8c77df29
15
Echo.php
15
Echo.php
|
@ -245,14 +245,11 @@ $echoIconPath = "Echo/modules/icons";
|
|||
// 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 @@ $wgEchoNotifications = array(
|
|||
'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' ),
|
||||
|
|
|
@ -101,7 +101,6 @@ $wgResourceModules += array(
|
|||
// 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
|
||||
|
|
|
@ -193,8 +193,8 @@ class EchoBatchRowWriter {
|
|||
$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'],
|
||||
|
|
|
@ -28,7 +28,7 @@ class EchoFlyoutFormatter extends EchoEventFormatter {
|
|||
$model->getHeaderMessage()->parse()
|
||||
) . "\n";
|
||||
|
||||
//@todo body text
|
||||
// @todo body text
|
||||
|
||||
$ts = $this->language->getHumanTimestamp(
|
||||
new MWTimestamp( $event->getTimestamp() ),
|
||||
|
|
|
@ -15,7 +15,6 @@ class EchoEditUserTalkFormatter extends EchoEditFormatter {
|
|||
// 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
|
||||
|
|
|
@ -157,7 +157,6 @@ class EchoNotificationMapper extends EchoAbstractMapper {
|
|||
// 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(),
|
||||
|
|
|
@ -143,7 +143,7 @@ class EchoEvent extends EchoAbstractEntity {
|
|||
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 ) );
|
||||
|
|
|
@ -90,7 +90,7 @@ class EchoNotification extends EchoAbstractEntity {
|
|||
$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;
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -69,7 +69,7 @@ class SuppressionMaintenanceTest extends MediaWikiTestCase {
|
|||
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 @@ class SuppressionMaintenanceTest extends MediaWikiTestCase {
|
|||
'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',
|
||||
|
|
Loading…
Reference in a new issue